Expected column value is not selecting

Hi All,
I have to table like below records
Select * from pa_tbl where emplid=’5705838’
Gives the Below result.
EMPLID    COMPANY     EFFDT_CODE        STATE    RESIDENT
5705838    T01         8/20/1998        CO            N          
5705838    T01         8/20/1998        PA            Y      
5705838    T01         1/1/2001        CO            N      
5705838    T01         1/1/2001        PA            Y  
From above result I have to select  only ‘state_code’  
1.Condition is  resident is ‘N’ with max(effdt)
2nd condition select state_code in ‘AK’, ‘NV’, ‘CO’, ‘PR’ among lot of state_codes .
Above example that i have given only for 'CO' state_code
I am able to extract sate code like  ’CO’ using below query
SELECT  STATE
FROM PS pa_tbl S
WHERE S.EMPLID  ='5705838'
AND S.RESIDENT = 'N'
AND S.STATE IN('AK','NV','CO','MI')
AND S.EFFDT   = (SELECT MAX(EFFDT)
                    FROM PS pa_tbl
                    WHERE EMPLID  = S.EMPLID
                    AND COMPANY = S.COMPANY
                    AND EFFDT <=SYSDATE);
Problem:-
Here user entered effdt is 1/1/2001 with state_code is 'PA' and resident='Y 'which is latest record. In this case my query should return NULL/NODATA found.
But my query returns STATE_CODE=CO (this is wrong)
How to write a sql query can any body give me advice please?
Thanks,
Krupa

Use analytic ROW_NUMBER:
SCOTT@orcl > select  *
  2    from  tbl
  3  /
    EMPLID COM EFFDT     ST R
   5705838 T01 20-AUG-98 CO N
   5705838 T01 20-AUG-98 PA Y
   5705838 T01 01-JAN-01 CO N
   5705838 T01 01-JAN-01 PA Y
SCOTT@orcl > with t as (
  2             select  state,
  3                     row_number() over(order by effdt desc) rn
  4               from  tbl
  5               where emplid = 5705838
  6                 and resident = 'N'
  7                 and state in ('AK','NV','CO','MI')
  8            )
  9  select  state
10    from  t
11    where rn = 1
12  /
ST
CO
SCOTT@orcl > with t as (
  2             select  state,
  3                     row_number() over(order by effdt desc) rn
  4               from  tbl
  5               where emplid = 5705838
  6                 and resident = 'Y'
  7                 and state in ('AK','NV','CO','MI')
  8            )
  9  select  state
10    from  t
11    where rn = 1
12  /
no rows selected
SCOTT@orcl >
SY.

Similar Messages

  • (XSRWLD06) A column value is not a valid member of its target dimension

    We are facing a strange issue that all the records gets rejected when attempted to load the cube. The error message is - (XSRWLD06) A column value is not a valid member of its target dimension
    This cube is simple and has only one dimension and one measure. The dimension has only 2 records and mapping appears to be correct.
    Really confused and unable to find the cause of the problem. Pls can you help
    Query used to populate the dimension
    ==========
    SELECT DISTINCT /*+ bypass_recursive_check */ T1."ACCFLAG_DESC" ALIAS_3, T1."ACCFLAG_DESC" ALIAS_4, T1."ACCFLAG_DESC" ALIAS_5, NULL ALIAS_6, 3 ALIAS_7 FROM NEDDWOWNER."OWNERSHIP_ACCOUNTS" T1 WHERE (T1."ACCFLAG_DESC" IS NOT NULL) UNION SELECT DISTINCT /*+ bypass_recursive_check */ T2."ACCFLAG_DESC" ALIAS_8, CAST (NULL AS VARCHAR2 (60) ) ALIAS_9, T2."ACCFLAG_DESC" ALIAS_10, NULL ALIAS_11, 0 ALIAS_12 FROM NEDDWOWNER."OWNERSHIP_ACCOUNTS" T2 WHERE (T2."ACCFLAG_DESC" IS NOT NULL) ORDER BY 1 ASC NULLS LAST
    ===========
    Query used to populate the cube
    ==========
    SELECT /*+ bypass_recursive_check cursor_sharing_exact no_expand no_rewrite */ T5_ACCFLAG_DESC ALIAS_13, SUM(T8_ES_CBSCCO_AJ_GBP) ALIAS_14 FROM ( SELECT /*+ no_rewrite */ T1."OWA_SEQ_ID" T8_OWA_SEQ_ID, T1."ES_CBSCCO_AJ_GBP" T8_ES_CBSCCO_AJ_GBP FROM NEDDWOWNER."VW_ACCOUNTS_MON_CUB_LOAD" T1 ) T8, ( SELECT /*+ no_rewrite */ T1."OWA_SEQ_ID" T5_OWA_SEQ_ID, T1."ACCFLAG_DESC" T5_ACCFLAG_DESC FROM NEDDWOWNER."OWNERSHIP_ACCOUNTS" T1 ) T5 WHERE (T8_OWA_SEQ_ID = T5_OWA_SEQ_ID) GROUP BY (T5_ACCFLAG_DESC) ORDER BY T5_ACCFLAG_DESC ASC NULLS LAST
    ===========
    Rejected Record
    Consumption 0
    Production 0
    Error:
    (XSRWLD06) A column value is not a valid member of its target dimension.

    Hi - This is still unanswered. Will the datatype of the source column mapped to the member and the fact table create the problem? As we are in the middle of evaluating different OLAP products, any inputs on the issue, will be really helpful...

  • Created by column value is not showing in XSLT List View After Migration To 2013

    Hello All,
    In my XSLT Created By Column value is not showing. Please help me with this problem. My code is simple I have custom column in XSLT name as 'Reported By' in which I want to show 'Created By' column value. but it is not showing. please help me with that.
    Thanks in advance

    hi
    is anyone has answer for this question.
    thanks...!!!!

  • Select only records where column values are not all equal to zero

    Hi everyone, this seems so easy but it's got me stumped on finding a clean, easy way to accomplish this. I'm sure when someone responds, I'll kick myself. So, assume the following is what I've got:
    with mytable as (
    select 'Type 1' as itemtype, 'JAN' as monthname, 0 as theval from dual union all
    select 'Type 1' as itemtype, 'FEB' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'MAR' as monthname, 5 as theval from dual union all
    select 'Type 1' as itemtype, 'APR' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'MAY' as monthname, 4 as theval from dual union all
    select 'Type 1' as itemtype, 'JUL' as monthname, 0 as theval from dual union all
    select 'Type 1' as itemtype, 'AUG' as monthname, 0 as theval from dual union all
    select 'Type 1' as itemtype, 'SEP' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'OCT' as monthname, 7 as theval from dual union all
    select 'Type 1' as itemtype, 'NOV' as monthname, 1 as theval from dual union all
    select 'Type 1' as itemtype, 'DEC' as monthname, 2 as theval from dual union all
    select 'Type 2' as itemtype, 'JAN' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'FEB' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'MAR' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'APR' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'MAY' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'OCT' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'NOV' as monthname, 0 as theval from dual union all
    select 'Type 2' as itemtype, 'DEC' as monthname, 0 as theval from dual
    select
      itemtype,
      sum (case monthname when 'JAN' then theval else 0 end) as JAN,
      sum (case monthname when 'FEB' then theval else 0 end) as FEB,
      sum (case monthname when 'MAR' then theval else 0 end) as MAR,
      sum (case monthname when 'APR' then theval else 0 end) as APR,
      sum (case monthname when 'MAY' then theval else 0 end) as MAY,
      sum (case monthname when 'JUN' then theval else 0 end) as JUN,
      sum (case monthname when 'JUL' then theval else 0 end) as JUL,
      sum (case monthname when 'AUG' then theval else 0 end) as AUG,
      sum (case monthname when 'SEP' then theval else 0 end) as SEP,
      sum (case monthname when 'OCT' then theval else 0 end) as OCT,
      sum (case monthname when 'NOV' then theval else 0 end) as NOV,
      sum (case monthname when 'DEC' then theval else 0 end) as DEC
    from mytable
    group by itemtype
    order by itemtypeI need an outer query around this one or something that will only select "Type 1"... i.e., if all of the months are each equal to zero, don't include the record in the result set.
    Summing them to get a total of zero is not an option, as I could have -15 and +15 in different columns, in which case, that record would need to be displayed.
    Something as simple as... "where not (oct = 0 and nov = 0 and dec = 0...) at the end is all I seem to need. I've thought about adding a case clause for each column, but that doesn't seem very efficient. Ideas?
    Thanks in advance!
    Mark
    Edit... I know the following will work using the MINUS operator, but my real query is really huge, and I don't want to have to write it twice...
    {code}
    select
    itemtype,
    sum (case monthname when 'JAN' then theval else 0 end) as JAN,
    sum (case monthname when 'FEB' then theval else 0 end) as FEB,
    sum (case monthname when 'MAR' then theval else 0 end) as MAR,
    sum (case monthname when 'APR' then theval else 0 end) as APR,
    sum (case monthname when 'MAY' then theval else 0 end) as MAY,
    sum (case monthname when 'JUN' then theval else 0 end) as JUN,
    sum (case monthname when 'JUL' then theval else 0 end) as JUL,
    sum (case monthname when 'AUG' then theval else 0 end) as AUG,
    sum (case monthname when 'SEP' then theval else 0 end) as SEP,
    sum (case monthname when 'OCT' then theval else 0 end) as OCT,
    sum (case monthname when 'NOV' then theval else 0 end) as NOV,
    sum (case monthname when 'DEC' then theval else 0 end) as DEC
    from mytable
    group by itemtype
    minus
    select
    itemtype,
    jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec
    from (
    select
    itemtype,
    sum (case monthname when 'JAN' then theval else 0 end) as JAN,
    sum (case monthname when 'FEB' then theval else 0 end) as FEB,
    sum (case monthname when 'MAR' then theval else 0 end) as MAR,
    sum (case monthname when 'APR' then theval else 0 end) as APR,
    sum (case monthname when 'MAY' then theval else 0 end) as MAY,
    sum (case monthname when 'JUN' then theval else 0 end) as JUN,
    sum (case monthname when 'JUL' then theval else 0 end) as JUL,
    sum (case monthname when 'AUG' then theval else 0 end) as AUG,
    sum (case monthname when 'SEP' then theval else 0 end) as SEP,
    sum (case monthname when 'OCT' then theval else 0 end) as OCT,
    sum (case monthname when 'NOV' then theval else 0 end) as NOV,
    sum (case monthname when 'DEC' then theval else 0 end) as DEC
    from mytable
    group by itemtype
    where ( oct = 0 and nov = 0 and dec = 0 and jan = 0 and feb = 0 and mar = 0
    and apr = 0 and may = 0 and jun = 0 and jul = 0 and aug = 0 and sep = 0
    order by itemtype
    {code}
    Edit again... Ok, I guess I'm answering my own question here, but I think using a WITH clause to write the main query once and then selecting * from it twice using the MINUS operator in between where the second query has where (oct = 0, etc.) is what I need. If anyone else has better suggestions, please do let me know! Here's the pseudo logic for what I've come up with so far...
    {code}
    WITH mainquery as (select everything)
    select * from mainquery
    minus
    select * from mainquery where (oct = 0, nov = 0, etc...)
    {code}
    Thanks again!
    Mark
    Edited by: user455268 on Mar 1, 2012 7:13 PM
    Edited by: user455268 on Mar 1, 2012 7:16 PM

    Hi,
    You can do that with a HAVING clause:
    select
      itemtype,
      sum (case monthname when 'JAN' then theval else 0 end) as JAN,
      sum (case monthname when 'FEB' then theval else 0 end) as FEB,
      sum (case monthname when 'MAR' then theval else 0 end) as MAR,
      sum (case monthname when 'APR' then theval else 0 end) as APR,
      sum (case monthname when 'MAY' then theval else 0 end) as MAY,
      sum (case monthname when 'JUN' then theval else 0 end) as JUN,
      sum (case monthname when 'JUL' then theval else 0 end) as JUL,
      sum (case monthname when 'AUG' then theval else 0 end) as AUG,
      sum (case monthname when 'SEP' then theval else 0 end) as SEP,
      sum (case monthname when 'OCT' then theval else 0 end) as OCT,
      sum (case monthname when 'NOV' then theval else 0 end) as NOV,
      sum (case monthname when 'DEC' then theval else 0 end) as DEC
    from mytable
    group by itemtype
    HAVING      MIN (theval)     != 0
    OR      MAX (theval)     != 0
    order by itemtype
    ;If the values are all 0, then the MIN and the MAX will both be 0.
    If either the MIN or the MAX is not 0, then the values are not all 0.
    This assumes that the combination (itemtype, monthname) is unique, as it is in your sample data.
    If that's not the case, start with a subquery that GROUPs BY itemtype, monthname, so that, when you get to the main query, that combination will be unique.

  • Concatenating column values does not work (in SQLplus)

    I entered the following command in SQLplus and expected to get a string where all column values are (comma) concatenated:
    select ''||username||','||'' from dba_users;
    Unfortunatly instead of
    SYSTEM,SYS,ANONYMOUS,XDB,.....
    all users were listed in a column of a result table.
    How else can I concat them as intended
    Peter

    Hi,
    That's called "String Aggregation".
    Starting in Oracle 11.2, the function LISTAGG does that.
    AskTom:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402
    shows several different ways to do it, for versions 9 and up.
    I recommend the first one, the user-defined function STRAGG, which is similar to LISTAGG, and which you can copy from that page.
    Once you have STRAGG installed, your query is simply
    SELECT    STRAGG (username)     AS all_usernames
    FROM      dba_users
    ;On Oracle 10 (and up) you may have a similar function, WM_CONCAT (owned by WMSYS), already installed.
    WM_CONCAT is not documented, so you may not want to use it in your Production applications.
    Another good site concerning String Aggregation is
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    If you're wondering why your original query didn't do what you hoped:
    SELECT  ...
    FROM    table_x;(withoiut a WHERE clause or any other clauses) is guaranteed to produce on row of output for every row in table_x. It doesn't matter what is in the SELECT clause; there will always be one output row fro every original row.

  • Crystal Reports XI - How to pull same column value with different select...

    I have a report with many (around 30) sub reports and it is giving serious performance issue. I am currently finding out a strategy to improve the performance. I see that most of the sub reports are taking same parameters from main report except for one parameter which is different for each sub report and hard coded in them and pulling up the same column value from a oracle database with a different select criterion. I am trying to find out a way using either of command/crystal formula/SQL expression which can do the same job for me and give me performance improvement. I tried to take the parameters from the main report in one sub report and mapped them to parameters being transferred to the command and then drag and drop the field for which I need to display the value but due to some reason it is not returning values when I am trying multiple commands...I need some help in selecting a strategy for this issue resolution and some guidance....Any help would be highly appreciated....

    My version is 11.5.8.826. First of all I need to make it clear that I have 6 set of sub reports and each set has 5 sub reports. So if I can resolve the issue for one set, I resolve it for all. The sub reports are doing nothing but fetching a column value using a simple SQL SELECT query and appending to the right of a box in main report. The issue is that all these queries embedded into the sub reports are using same SQL except for one parameter in the "where" clause and they are fetching same column value from the database and fortunately all of them are returning same number of results. So at the end these results create a table when run. The only way I can stop using sub reports is by creating a table in the main report and use some object(formula/command/SQL expression or whatever) to fetch that column value using the same filter conditions. But please take a note that I need to use and append the same column value from a database table and use different filter conditions and append them to the right so that at the end they create a table...as long as I get the table in the output with a decent performance , anyone will be least bothered about what I used inside the report.....please ask me as many questions to get more lights on the issue....

  • How to get column value of a selected row of ALV

    Hello ,
    I have application POWL POWL_UI_COMP uses  another component  POWL_TABLE_COMP.
    This POWL_TABLE_COMP uses SALV_WD_TABLE.
    I want to select value of ORDER id and it need to be passed whenever user selects a display order button(Which is self defined function generated in POWL_TABLE_COMP) . I am calling a display order on action of this display button(http://nap60.nalco.one.net:8042/sap/bc/webdynpro/sap/mt_order_app?IV_ACTIVITYTYPE=A&IV_EQUIPMENT=aaaa&IV_ORDERID=90001511&IV_ORDERTYPE=STD&IV_QMNUM=00&IV_TPLNR=00)
    ORDERID is one column value of selected row of ALV table.
    So please can you suggest , how to read ORDERID and pass it to the self defined function..
    thanks in advance,
    Sharada

    Anoop,
    I have plcaed this code in event handler of  on_lead_select.
    Its giving error  the element doesnt exist. 
    static_attributes should give me row data but it's giving short dump saying
    Pl can you suggest.
    data:   set_of_element type WDR_CONTEXT_ELEMENT_SET,
            element1 type ref to IF_WD_CONTEXT_ELEMENT,
            result type POWL_CRESULT_STY,
            table_helper type ref to CL_POWL_TABLE_HELPER,
          context_node type ref to IF_WD_CONTEXT_NODE,
           lt_selected_elements TYPE wdr_context_element_set,
           static_attributes type ref to data.
      table_helper = wd_comp_controller->mr_table_helper.
      context_node = table_helper->get_data_node( ).
      context_node = wd_comp_controller->mr_table_helper->get_data_node( ).
      context_node->get_static_attributes( exporting index = r_param->index
                                          importing static_attributes = static_attributes ).
    thanks,
    Sharada

  • Second selectOneMenu updates values, but not selected value

    I have a drop down box that when a value is selected the second drop down box queries the database and is filled in. This works fine, but if I change the value in the second drop down box so the selected value is now something different. And then change the first drop down box, which updates the second. The second box will continue to show the previously selected value and not the default value that I want.
    Sorry for that being confusing. It seems that the getter is not called in the bean for the second drop down box after it is updated a second time.
    Here is some of the code:
                   <h:selectOneMenu id="firstDropDown" style="width:85px" value="#{firstDropDownBean.clientSelected}" immediate="true"
                                 onchange="this.form.submit();" valueChangeListener="#{firstDropDownBean.requerySecond}">
                        <f:selectItems value="#{firstDropDownBean.clientCodeList}" />
                    </h:selectOneMenu>
                    <br>
                    <h:selectOneMenu id="secondDropDown" style="width:85px" value="#{firstDropDownBean.secondSelected}" immediate="true">
                        <f:selectItems value="#{firstDropDownBean.secondList}" />
                    </h:selectOneMenu>
        public void requerySecond(ValueChangeEvent event)
            fillSecondList((String)event.getNewValue());
            FacesContext.getCurrentInstance().renderResponse();
        }The "fillSecondList" sets the secondSelected value

    Hi,
    using JSF Reference Implementation requires you to redirect the page (refresh the page) to show changes. It has no notion of partial refresh (which is available in ADF Faces). So the problem you face appears to be in the page refresh not happening
    Frank

  • "Item Containing Primary Key Column Value" does not display records

    Hello,
    We are developing a new page where an "Automated Row Fetch" process is needed.
    With other pages we experienced no issues. But with a new one, when defining the value for the field “Item Containing Primary Key Column Value”, Apex displays no rows.
    As far as we know, Apex should display all the fields defined for the page. Is there any property which affects the fields visibility?
    The affected page has textarea and text fields.
    Thanks in advance.

    Hello,
    Sorry, we have already detected that the problem was at field definition.
    Fields should be defined as "Source Type: Database Column". They were wrong defined.
    Thanks.

  • Possible Bug: Rows & Column values are not honoured in panel form layout

                      <af:panelFormLayout id="pfl10"
                                                                                    binding="#{backingBeanScope.backing_AssemblyStarts.pfl10}"
                                                                                    rows="1" maxColumns="4"
                                                                                    fieldWidth="66%" labelWidth="34%">
    Even after Running, saving, deploying it shows the same 4 rows...
    I wanted to include image as well... how to insert image in the question ? I drag and drop image on this editor, but it did not allow me to submit the question.
    Here is the image I uploaded on google drive...
    https://docs.google.com/file/d/0B7Po4hB-u4BgS3ExWG5YdjRIS1E/edit?usp=sharing
    Thanks
    Rahul

    It is confirmed now...... I checked that this "Panel Form Layout" does not work on popup. It does not change rows and columns at all..... !!!!
    It works fine on the normal page... but not on the popup.
    Is it Bug or it is shortcoming of 'panel form layout' ???
    Anybody listening ??  anybody faced this earlier ???
    Thanks
    Rahul

  • How can join two tables if column values does not match

    Hi guys,
    i have table
    col1 col2
    abcd 123
    asdf 234
    wert 456
    sedf 789
    and another table with
    col1
    abcd
    aaaa
    but i need the output like
    abcd 123
    abcd 234
    abcd 456
    abcd 789
    aaaa 123
    aaaa 234
    aaaa 456
    aaaa 789

    You do not tell us about this where condition before, but...
    select b.col1, a.col2  from table a, another_table b
    where a.col2 in (123, 234, 456, 789)or
    select b.col1, a.col2  from table a, another_table b
    where a.col1 in ('abcd','asdf','wert','sedf' )

  • To fetch column values based on selected month and year

    Hi,
    I have a requirement where I have 2 prompts Fiscal Year and month on a report.
    Therefore when I select Year and the month I should get the ID's for the selected month till the first month of that fiscal year.
    E.g By selecting July  and year 2013 I should get all the id's in the report from Jan 2013 till July 2013.
    How to acheive his in OBIEE. Please help.

    what is the column for comparing these two dates ? I am considering CALENDAR_DATE
    CALENDAR_DATE BEWEEN
    CAST(concat('01-JUL-', (CASE WHEN pv_month in ('JAN', 'FEB', 'MAR') THEN CAST(((CAST(RIGHT(pv_Year),4) AS INT) -1) as CHAR) ELSE CAST((RIGHT(v_Year),4) as CHAR) END)) AS  DATE)
    AND
    CAST(concat(concat(concat('01-', v_month),'-'),(CASE WHEN v_month in ('JAN', 'FEB', 'MAR') THEN CAST(((CAST(RIGHT(v_Year),4) AS INT) -1) as CHAR) ELSE CAST((RIGHT(v_Year),4) as CHAR) END) AS DATE)
    This logic might work, just play around type casting..
    Regards,
    Srinivas

  • Weird ORA-01406: fetched column value was truncated error for SELECT query

    DB version:10gR2
    When one of our application fires the below query, we get
    ORA-01406: fetched column value was truncatederror.
    select     trk_dtl,
         trk_type,
         trk_id,
         trk_desc,
    from     shp_dtl
    where     shp_type = 'HN'
    and     shp_type = 828;The documentation says
    Cause:In a host language program, a FETCH operation was forced to truncate a character string. The program buffer area for this column was not large enough to contain the entire string. The cursor return code from the fetch was +3.But when the application is pointed to an identical schema in the same instance, we don't get this error. So, this has got nothing to do client application as the documentation says.
    Any idea what other possibilities are there?

    Post description of shp_dtl.

  • Unable to pass report column value to url in select statement. Please help

    Hi all,
    I am trying to pass the report column value as follows:
    select key, num,
    case when Attachmentcnt(KEY) != 0 then
    'f?p=&APP_ID.:91:&SESSION.:'' '':NO::P91_KEY,P91NUM,P91_PREVPG:'And I am passing values as follows:
    {noformat}
    '#KEY#,'#NUM#','9' ELSE null
    END Attachment
    from tableA
    {noformat}
    But, I am not able to figure out correct sysntax to pass these column values. Can anyone give me some help. I appreciate it.
    rgds,
    Suma.
    Edited by: sumak on Jun 23, 2009 12:11 PM
    Edited by: sumak on Jun 23, 2009 12:22 PM

    Suma,
    If you're trying to generate a column with a URL, try something like the following:
    select key, num,
    case when Attachmentcnt(KEY) != 0 then
    'f?p=&APP_ID.:91:&SESSION.:'' '':NO::P91_KEY,P91NUM,P91_PREVPG:'
    || tableA.key || ',' || tableA.num || ',' || :P91_PREVPG
    else NULL
    end
    FROM tableA;
    But the best way to pass these would include checksum values against the values of your parameters (to make sure a user doesn't hack them). You'll need to check the Apex User manual for details - See "Understanding Session State Protection".
    Good luck,
    Stew

  • How to select each character of column value

    Hi All,
    How can i get each character separately of a column value in a select statement.
    LIKE i emp table if ename='Test' then i want
    a select statement that can give me the result like this
    T,e,s,t
    Regards,
    Anil R

    or this?
    SQL> create table mytable
      2  as
      3  select 'test' text from dual union all
      4  select 'a text, containing two comma''s (,)' from dual union all
      5  select 'a text ending with a comma,' from dual
      6  /
    Tabel is aangemaakt.
    SQL> select text
      2       , substr(regexp_replace(text,'(*?)',',\1'),2,length(text)*2-1) with_commas
      3    from mytable
      4  /
    TEXT                               WITH_COMMAS
    test                               t,e,s,t
    a text, containing two comma's (,) a, ,t,e,x,t,,, ,c,o,n,t,a,i,n,i,n,g, ,t,w,o, ,c,o,m,m,a,',s, ,(,,,)
    a text ending with a comma,        a, ,t,e,x,t, ,e,n,d,i,n,g, ,w,i,t,h, ,a, ,c,o,m,m,a,,
    3 rijen zijn geselecteerd.Regards,
    Rob.
    Message was edited by:
    Rob van Wijk
    Slight modification to cater for strings beginning and ending with commas.

Maybe you are looking for