using % for all null values or empty including

Hello all;

Below is the sample data
create table t1
(
ID varchar2(200),
time_create date
);

insert into t1
    (id, time_create)
  values
    ('A', sysdate);
  
  insert into t1
    (id, time_create)
  values
    ('B', sysdate);
    
    insert into t1
    (id, time_create)
    
    
  values
    (null, sysdate);
    
I have the below sql statement
    
    select * from t1
    where t1.id like decode(:id, 'ALL', '%', :id);
now I have a situation where if user input is EVERYTHING, I want to get all the results, including null values or values space, how can I change the decode statement to do.

This is the output I want below for ALL
ID  TIME_CREATE
A   5/23/2011 11:14:23 PM
B   5/23/2011 11:14:24 PM
     5/23/2011  11:14:25 PM
Any help is appreciated. Thank you.

Maybe:

Select * from t1
where (: id = 'ALL')
OR id =: id);

Or something similar depending on

Scott

Tags: Database

Similar Questions

  • How to set a master password, that I can use on my laptop to be used for all programs. I have a computer at home

    I don't remember all the different passwords to be used.

    I have a tablet on my desk to write all the information required to connect to the program.

    I hear that home count, I can set up a master password to be used for all programs.

    If possible can anyone give/suggest how to proceed.

    Instructions, I had to do was control + user account set up a master password.

    I have a Dell Inspiron runnung office 7 portable

    Hello

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en/w7itprogeneral/threads

    I hope this helps.

  • I just remdered and recorded an intro I would like to use for all my projects, it is saved in a (* perl) file and is the only option to save in this format.  "When I try to open this file and start a new project using tha the intro file, I get an error.

    I just made and recorded an intro I would like to use for all my projects, it is saved in a (* perl) file and is the only option to save in this format.  When I try to open this file and start a new project using tha the intro file, I get an error "the file is not a supported file or codex is not installed.  How can that be, I made the file using this program and he does'nt recognize files it creates?  Please advise... Thanks /.

    grethell

    What version of Premiere Elements you are using and on what computer operating system is running?

    You cannot import a project file (.prel) in another.

    For now, generalize choice

    a. export your Timeline (your intro) content to a file saved on the hard drive of the computer. And then import that

    file in new projects by using the new project add Media/files and folders. See publish + Share/computer/and the other

    choices here to generate this file intro for later use in other projects.

    b. you can set up what is called a dummy projects - this is a project with nothing other than the intro file. And, at all times

    you want to use the intro, you open one of these saved dummy projects and add your media sources.

    A lot of things to discuss. Please fill in some details more and then we can refine the answer for your particular situation.

    Thank you.

    RTA

  • Use Insert all but want only to insert records for non-null values

    Hi, New here and could use some help with my sql statement.  I have a portfolio with denormalized data table that has been inserted via .csv file.  It is a contract with a base, options and extensions.  I need to create a contract record, then a separate record in the table for each base/option/extension contract Details.  I use INSERT ALL so I maintain the CONTRACT_ID for the secondary table.  My problem is that my statement puts a line in the table of details for the null records, that I don't want.  (i.e. 123 contract has a Base, Option 1, Option 2 and Option 3, but I'm getting a line for these lines with dates more null for Option 4, Ext 1, Ext 2, Ext 3 and Ext 4).  I want to insert only when the % CTRT_STRT_DT is NOT NULL.  It will be different for each contract.  Where should I put the IS NOT NULL statement?  Here is my complete insert statement:

    -Contract data

    INSERT ALL

    IN LRTC)

    CTRT_ID,

    PRGRM_OFC_TYP_CD,

    CTRT_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    PRGRM_OFC_TYP_CD,

    SPLS_SRVS_DESC,

    SYSDATE)

    -Contract detail for another period of performance data

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    "Other."

    OTHER_CTRT_STRT_DT,

    OTHER_CTRT_END_DT,

    OTHER_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Contract detail data for the reference period of performance

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Base ',.

    BASE_CTRT_STRT_DT,

    BASE_CTRT_END_DT,

    BASE_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 1 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    "Option 1",

    OPT1_CTRT_STRT_DT,

    OPT1_CTRT_END_DT,

    OPT1_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 2 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Option 2',

    OPT2_CTRT_STRT_DT,

    OPT2_CTRT_END_DT,

    OPT2_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 3 lead time

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Option 3',

    OPT3_CTRT_STRT_DT,

    OPT3_CTRT_END_DT,

    OPT3_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Option 4 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Option 4',

    OPT4_CTRT_STRT_DT,

    OPT4_CTRT_END_DT,

    OPT4_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 1 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    'Extension 1',

    EXT1_CTRT_STRT_DT,

    EXT1_CTRT_END_DT,

    EXT1_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 2 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    '2 Extension',

    EXT2_CTRT_STRT_DT,

    EXT2_CTRT_END_DT,

    EXT2_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 3 lead time

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    '3 Extension',

    EXT3_CTRT_STRT_DT,

    EXT3_CTRT_END_DT,

    EXT3_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    -Data contract detail for Extension 4 execution time-out

    IN CTRT_DTLS)

    CTRT_ID,

    CTRT_STAT_CD,

    CTRT_PER_NME,

    CTRT_STRT_DT,

    CTRT_END_DT,

    CTRT_CURR_AMT,

    CTRT_NO,

    CTRT_VNDR_NME,

    CREN_DT)

    VALUES)

    CTRT_ID_SEQ. NEXTVAL,

    1,

    '4 Extension',

    EXT4_CTRT_STRT_DT,

    EXT4_CTRT_END_DT,

    EXT4_CTRT_CURR_AMT,

    CTRT_NO,

    CTRTR_NME,

    SYSDATE)

    SELECT

    PRGRM_OFC_TYP_CD,

    SPLS_SRVS_DESC,

    CTRT_NO,

    CTRTR_NME,

    To_date(PER_OF_PFRM_OTHER_ST_DT,'MM/DD/YYYY') as OTHER_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OTHER_END_DT,'MM/DD/YYYY') as OTHER_CTRT_END_DT,

    CUR_VAL_BY_POP_OTHER_AMT as OTHER_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_BASE_ST_DT,'MM/DD/YYYY') as BASE_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_BASE_END_DT,'MM/DD/YYYY') as BASE_CTRT_END_DT,

    CUR_VAL_BY_POP_BASE_AMT as BASE_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT1_ST_DT,'MM/DD/YYYY') as OPT1_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT1_END_DT,'MM/DD/YYYY') as OPT1_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT1_AMT as OPT1_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT2_ST_DT,'MM/DD/YYYY') as OPT2_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT2_END_DT,'MM/DD/YYYY') as OPT2_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT2_AMT as OPT2_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT3_ST_DT,'MM/DD/YYYY') as OPT3_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT3_END_DT,'MM/DD/YYYY') as OPT3_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT3_AMT as OPT3_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_OPT4_ST_DT,'MM/DD/YYYY') as OPT4_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_OPT4_END_DT,'MM/DD/YYYY') as OPT4_CTRT_END_DT,

    CUR_VAL_BY_POP_OPT4_AMT as OPT4_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT1_ST_DT,'MM/DD/YYYY') as EXT1_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT1_END_DT,'MM/DD/YYYY') as EXT1_CTRT_END_DT,

    CUR_VAL_BY_POP_EXT1_AMT as EXT1_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT2_ST_DT,'MM/DD/YYYY') as EXT2_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT2_END_DT,'MM/DD/YYYY') as EXT2_CTRT_END_DT,

    CUR_VAL_POP_EXT2_AMT as EXT2_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT3_ST_DT,'MM/DD/YYYY') as EXT3_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT3_END_DT,'MM/DD/YYYY') as EXT3_CTRT_END_DT,

    CUR_VAL_BY_POP_EXT3_AMT as EXT3_CTRT_CURR_AMT,

    To_date(PER_OF_PFRM_EXT4_ST_DT,'MM/DD/YYYY') as EXT4_CTRT_STRT_DT,

    To_date(PER_OF_PFRM_EXT4_END_DT,'MM/DD/YYYY') as EXT4_CTRT_END_DT,

    CUR_VAL_BY_POP_EXT4_AMT as EXT4_CTRT_CURR_AMT

    OF CTRT_HLDG A, PRGRM_OFC_TYP_LKUP B

    WHERE UPPER (A.OFC_NME) = UPPER (B.PRGRM_OFC_TYP_NME);

    Thanks for any help.

    Chris

    You're close.  Basically, you add one when befire each Inserts lines.  Something like:

    INSERT ALL

    When the ctrt_id is not null then

    IN LRTC (PRGRM_OFC_TYP_CD, CTRT_NME, CTRT_ID, CREN_DT)

    VALUES (CTRT_ID_SEQ. NEXTVAL, PRGRM_OFC_TYP_CD,

    SPLS_SRVS_DESC, SYSDATE)

    -Contract detail for another period of performance data

    When the OTHER_CTRT_STRT_DT is not null then

    IN (CTRT_ID, CTRT_STAT_CD, CTRT_PER_NME, CTRT_DTLS

    CTRT_STRT_DT, CTRT_END_DT, CTRT_CURR_AMT,

    CTRT_NO, CTRT_VNDR_NME, CREN_DT)

    VALUES (CTRT_ID_SEQ. NEXTVAL, 1, 'Other', OTHER_CTRT_STRT_DT,

    OTHER_CTRT_END_DT, OTHER_CTRT_CURR_AMT,

    CTRT_NO, CTRTR_NME, SYSDATE)

    -Contract detail data for the reference period of performance

    When the BASE_CTRT_STRT_DT is not null then

    IN (CTRT_ID, CTRT_STAT_CD, CTRT_PER_NME, CTRT_DTLS

    CTRT_STRT_DT, CTRT_END_DT, CTRT_CURR_AMT,

    CTRT_NO, CTRT_VNDR_NME, CREN_DT)

    VALUES (CTRT_ID_SEQ. NEXTVAL, 1, 'Base', BASE_CTRT_STRT_DT,

    BASE_CTRT_END_DT, BASE_CTRT_CURR_AMT, CTRT_NO,

    CTRTR_NME, SYSDATE)

    You may need to adjust my predicates, but it should give you the idea.

    John

  • test for the null value to IN request (null, 'a ', ' b', 'c')

    Hello

    Oracle 10.2.0.4

    I think the following query is incorrect, in my opinion. (there is an index on the collar, but NULL values are ignored?

    SELECT COUNT (*) < table > where col in (null, 'a ', ' b', 'c')

    It works (no errors) and forth fast enough.

    However, I think the correct query would

    SELECT COUNT (*) < table > where IS NULL or neck neck ('a', 'b', 'c')

    It takes a lot of time. As I see it, he performs a table scan for part of the value NULL and use the index for the rest, as the index cannot be used for NULL values.

    I would appreicate an explanation on this matter, particularly why Oracle accepts the first query "where col in (null, 'a ', ' b', 'c')" without any problem.

    Thank you

    A null value is not equal to what whatsoever, not even another null value. This is consistent with the definition of the ANSI. For your first request is not what you think it does, even if it is not syntactically incorrect.

    The second query is correct. If you want to use an index, you must create a bitmap index (which requires Enterprise Edition licenses), because they do not include the values NULL, unlike B * tree index.

  • Dealing with a URL parameter to be used for a default value

    I have a page of results of detail (the CONTACTS Table Recordset), identified by the CONTACTID

    In the same page, I also have another dynamic relational table, showing all the associated notes that contact record (recordset CONTACTNOTES identified using CONTACTS. CONTACTID = CONTACTNOTES. NOTESCONTACTID)

    It works fine and I can update CONTACTS without any problem.

    My problem is to insert a new record CONTACTNOTES (of a simple URL link) also associated with the same record.

    The primary field (NOTEID) is an AutoNumber but I need to carry out CONTACTS. CONTACTID variable to use as the default value for the CONTACTNOTES url. NOTESCONTACTID.

    I think something like that...

    in the dynamic table on the initial results page, using (/ insertnote.php?) CONTACTID = <? PHP echo $row_recordlookup ["NOTESCONTACTID"];? >) as the link, setting the URL parameter.

    The page insertnote has a recordset insert form, related to the CONTACTNOTES table.

    Now, I don't know how to add this URL parameter as the default field value. Is it as simple as putting the $HTTP_GET_VARS ["CONTACTID"] in the field of the Init val in the property inspector?

    Sorry - worked on...

    On the new page of note insertion, I first created a Recordset, duplicate on the initial results page.

    When you create the form, it was easy then to insert {CONTACTS. CONTACTID} as a default value.

  • Re: Replace all NULL values by '0' in the entire table at a time

    Hi all
    I want to replace all null with '0' (zero) values in the columns all at once. Is there a query and the procedure.

    Thanks in advance.

    UPDATE tablename SET column = RequiredValue
    WHERE appropriate_restriction (s)
    Altwernatively you can use NVL:
    Setting a DAY tablename SET column = NVL (RequiredColumn, RequiredValue)

  • This is the forum for all the updates of windows including XP?

    Because you can't see the newsgroup microsoft.public.windowsupdates I wonder if this forum is the same or anyone who uses the Microsoft Forum NNTP Bridge where it is through 127.0.0.1 discussion group.

    Or where is windows update newsgroup now please for all operating systems

    Robin

    You're welcome, Robin.

    You may want to read...

    http://social.technet.Microsoft.com/forums/en/winserverTS/thread/a6ca3f8f-C39E-42eb-A139-78f28d0b9477

    Community Forums NNTP bridge:
    http://communitybridge.codeplex.com/

    Community Forums NNTP bridge
    http://communitybridge.codeplex.com/documentation

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I need a free software to use for all my students data registration

    I need a free software to use for recording of all data from my students to my computer

    sage180

    If you mean the personal info, then http://www.libreoffice.org/

  • Fill Winding rule null is used for all pixels on the screen?

    Hello

    I wanted to know this questions so I can better understand the operation in general programs Illustrator and vector. Trying to understand how the pathfinder, I learned later the winding fill rule non-zero.

    I think I understand that it is used to determine what parts of an object is filled when his path crosses itself or what other objects cross with her. Whenever the number of winding is not 0, it means that he went through something, that makes the number 1 coil. If it crosses this line again in the opposite direction, the winding number gets subtracted once again, so you have 0 again. Fill if the number is different from 0.

    But, my question is this. This made only of pixels IN a form, to determine if there is a hole inside... or if it actually makes for every single pixel in your file, whenever you open a file, for each pixel on the screen, it uses the rule fill winding non-zero?

    For example, if you make a small circle in the middle of your screen, is each pixel on the screen tested with the winding fill rule nonzero in order to determine whether a pixel is part of the circle?

    Thank you.

    I found it it seems.

    If anoyne wants to know

    -Vector programs determines how many pixels on the screen

    -It creates shapes with a formula, circle, square, Bézier formulas

    for simple objects without intersection he uses limit fills, he chooses a pixel of seeds within the object

    It checks the 4 or 8 next to it

    She fills until it finds an edge

    no simple forms, it checks each pixel on the screen with a number of winding

  • How can I identify the corresponding lines when lead and trolling can be used for several similar values in their?

    I use:

    Oracle SQL Developer (3.0.04) build hand - 04.34 Oracle Database 11 g Enterprise Edition 11.2.0.1.0 - 64 bit Production


    Examples of data

    Table

    with t as)

    Select to_date('8-18-2013','mm-dd-yyyy') dt, "123_' ticket_origin, ticket_destination '123', startid 101, 101 origin, destination 0, 'origin' objecttype, amount 85, 100 area union double all the

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 0, 101, 103, 'destination', 85, 100 of all the double union

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 103, 0, 0, 'destination', 85, 100 of all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 105, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 106, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 0, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 105, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127_', '127', 108, 108, 0, 'origin', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 75, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 112, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 109, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 0, 0, 112, 'destination', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 108, 0, 112, 'destination', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125. ', 0, 0, 109, 'destination', 60, 900 from all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125'., 108, 0, 109, 'destination', 60, 900 double

    )

    Is there a way to check date of consolidation for correspondence ticket_origin and ticket_destination when there are two or more lines of difference between them, which does not allow me to use result delay or function. It is also possible do it without using the amount column?

    I also want to identify if they are in the same region, when it is associated with (that I believe works after getting sorted table like so below then use lead lag after having de facto order)

    I'm trying to get something like this table

    with results like)

    Select to_date('8-18-2013','mm-dd-yyyy') dt, "123_' ticket_origin, ticket_destination '123', startid 101, 101 origin, destination 0, 'origin' objecttype, amount 85, 100 area union double all the

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 103, 0, 0, 'destination', 85, 100 of all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 105, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 105, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127_', '127', 108, 108, 0, 'origin', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 0, 0, 112, 'destination', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 108, 108, 0, 'origin', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125. ', 0, 0, 109, 'destination', 60, 900 double

    )

    You need to research rules business more to clarify and apply the mapping one.  The main secret is probably to match the values of ticket.

    Under use a t_view of view with the addition of PK (RID) to the table.  Some discrepancy could be solved by adding more rules for mapping and correcting the expected result entry errors

    SQL > desc t_view

    Name

    ------------------------

    RID

    DT

    TICKET_ORIGIN

    TICKET_DESTINATION

    STARTID

    ORIGIN

    DESTINATION

    OBJECTTYPE

    AMOUNT

    AREA

    with

    T1 as (select * from t_view where OBJECTTYPE = 'origin'),

    T2 as (select * from t_view where OBJECTTYPE = 'destination').

    map as (t1.rid select origin_id, t2.rid from t1 DESTINATION_id, t2)

    where t1. TICKET_ORIGIN = t2. TICKET_DESTINATION

    and t1. TICKET_DESTINATION = t2. TICKET_ORIGIN

    -Add rules to apply the one-to-one mapping

    and t1.amount = t2.amount

    and t1. STARTID = t1. ORIGIN

    and t2. STARTID = t2. ORIGIN),

    like map2)

    Select origin_id gid, origin_id rid of card

    Union of all the

    Select origin_id gid, DESTINATION_id rid of card)

    Select t_view.* card2, t_view where map2.rid = t_view.rid

    order of map2.gid, map2.rid

    /

       GET RID OF THE DT TICKE TICKE STARTID ORIGIN DESTINATION OBJECTTYPE AMOUNT AREA

    ---------- --------- ----- ----- ---------- ---------- ----------- ----------- ---------- ----------

         1 18 AUGUST 13 123_ 123 101 101 0 origin 85 100
         3 18 AUGUST 13 123 123_ 0 0 destination of 103 85 100
         4 17 AUGUST 13 124. _ 124. 105 105 0 origin 150 200
         6-17 AUGUST 13 124.  124 _ 0 0 destination of 106 150 300
         8 17 AUGUST 13 127_ 127 108 108 0 origin 50 600
         AUGUST 9-17 13 127 127_ 0 0 destination of 110 50 600
        11-17 AUGUST 13 125. _ 125. 108 108 0 origin 60 800
        15-17 AUGUST 13 125.  125 _ 0 0 destination of 112 60 700
        13-17 AUGUST 13 125.  125 108 108 0 origin 60 800
        17 17 AUGUST 13 125 125. 0 0 destination of 109 60 900

    10 selected lines.

  • How to package a different content, so that the same license can be used for all content.

    1) If packing everything at the same time, use the same DRMParameters instance whenever you call MediaEncrypter.encryptContent ().  Everything packed using the exact the same DRMParameters object will be associated with the same license.

    2) If the contents of package at different times, but who want to have all the content associated with the same license, you must use V2KeyParameters.setContentEncryptionKey ().  The first time you compress a piece of content, you would use ContentEncryptionKey.generate () to generate a new key/license ID.  To use the same key/license for the content later, you need to store the info in ContentEncryptionKey, so you can later pass in values for the new content.

    The content of the package at different times using the same license, you must implement the following:

    1. Call ContentEncryptionKey.generate to generate a new key and who deliver the ID.
    2. On your V2KeyParameters, call setContentEncryptionKey and pass the object generated in step 1.
    3. Call MediaEncrypter.encryptContent and pass in the V2KeyParameters (via DRMParameters), as usual.
    4. Store the contents of ContentEncryptionKey, values can be used later.  The key, license ID, and the date of packaging must all be stored.
    5. When you want content extra package using this license, looks for the stored key, license ID and packaging date and pass in the ContentEncryptionKey constructor to create an instance of ContentEncryptionKey.
    6. On your V2KeyParameters, call setContentEncryptionKey and pass the object generated in step 5.
    7. Call MediaEncrypter.encryptContent and pass in the V2KeyParameters (via DRMParameters), as usual.

    Media conditioned to steps 3 and 7 should now be protected using the same license.

  • Create snapshot for all columns in a tableview, including hidden columns

    I am trying to create a snapshot of a tableview. The table view has width fixed on the screen, but can have multiple columns. When a snapshot of the tableview is taken only the columns that are visible appear in the image and the remaining columns that are hidden and who must scroll by a scroll bar does not appear. How to do this. is it possible. code example will be a great help.

    Thank you.

    public static WritableImage createSnapShotOfANode(Node node, int width, int height) {
            WritableImage img = new WritableImage(width, height);
            img = node.snapshot(null, img);
            return img;
        }
    

    In this method, I pass a tableview as a node. the width of the tableview as setting width and height.

    This takes only the snapshot of the visible columns but not all columns. I also added the width of all columns and that past as the param for the width parameter, but no change.

    How to do this.

    1. Remove the TableView to its current stage.
    2. Create a new scene.
    3. Put the TableView in the new scene.
    4. Take a snapshot of the new scene.
    5. Replace the TableView in its original scene.
  • replace NULL values for not null values prior

    Hi all

    I want to set to Null to override value not zero preious available. data are sorted by column Date DT
    WITH 
    TEMP AS (SELECT SYSDATE DT, 1005 ID1, NULL ID2 FROM DUAL    
    UNION ALL
    SELECT SYSDATE+1 DT, 1005    , NULL ID2 FROM DUAL
    UNION ALL
    SELECT SYSDATE+2 DT, 1006,    1005 ID2 FROM DUAL
    UNION ALL
    SELECT SYSDATE+3 DT, 1006    , NULL ID2 FROM DUAL
    UNION ALL
    SELECT SYSDATE+4 DT, 1007,    1006 ID2 FROM DUAL
    UNION ALL
    SELECT SYSDATE+5 DT, 1007    , NULL ID2 FROM DUAL
    UNION ALL
    SELECT SYSDATE+6 DT, 1007    , NULL ID2 FROM DUAL
    UNION ALL
    SELECT SYSDATE+7 DT, 1006,    1007 ID2 FROM DUAL
    )
    SELECT * FROM TEMP
    I want the output voltage:
    DT                     ID1      ID2     
    1/6/2012 9:54:11 AM    1005    NULL
    1/7/2012 9:54:11 AM    1005    NULL
    1/8/2012 9:54:11 AM    1006    1005
    1/9/2012 9:54:11 AM    1006    1005
    1/10/2012 9:54:11 AM    1007    1006
    1/11/2012 9:54:11 AM    1007    1006
    1/12/2012 9:54:11 AM    1007    1006
    1/13/2012 9:54:11 AM    1006    1007
    time added so far can be ignored.

    Thanks in advance.

    ... Vivek
    WITH temp AS (
    SELECT SYSDATE DT, 1005 ID1, NULL ID2 FROM DUAL UNION ALL
    SELECT SYSDATE+1 DT, 1005    , NULL ID2 FROM DUAL UNION ALL
    SELECT SYSDATE+2 DT, 1006,    1005 ID2 FROM DUAL UNION ALL
    SELECT SYSDATE+3 DT, 1006    , NULL ID2 FROM DUAL UNION ALL
    SELECT SYSDATE+4 DT, 1007,    1006 ID2 FROM DUAL UNION ALL
    SELECT SYSDATE+5 DT, 1007    , NULL ID2 FROM DUAL UNION ALL
    SELECT SYSDATE+6 DT, 1007    , NULL ID2 FROM DUAL UNION ALL
    SELECT SYSDATE+7 DT, 1006,    1007 ID2 FROM DUAL
    )
    SELECT dt, id1, last_value(id2 ignore nulls) over(order by dt) as id2
    FROM temp
    ORDER BY dt
    ;
    
  • How to show a value of 0 for the null value

    Hi all

    How to see the value of zero (0) in the values column zero in pivot mode? Help, please


    Thanks in advance.

    Hi Lisa,

    In the criteria of the tab-> data-> number Format column properties treat as (choose: custom) and custom digital format write this: #, # 0;-#, # 0; 0

    Best regards
    Dana

Maybe you are looking for