Need to Pad char columns in select statements using JDBC

When issuing:
select * from tab1 where col1='ABC'
return o raws, if col1 is of type char(4).
Need to pad with spaces for RTRIM().
There is dicussion on Metalink. Is this fixed? An idea. Thanks

You probably mean:
PreparedStatement ps = conn.prepareStatement("select * from tab1 where col1=?")
ps.setString(1,"ABC");
ps.executeQuery();
Replace getString() with:
((oracle.jdbc.driver.OraclePreparedStatement)ps).setFixedCHAR(1,"ABC");
This should make the SELECT work.
null

Similar Messages

  • Need to Improve  pefromance for select statement using MSEG table

    Hi all,
    We are using a select statement using MSEG table
    which takes a very long time to run the program which is scheduled in back ground.
    Please see the history below.;
    1) Previously this program was using SELECT-ENDSELECT statement inside the loop i.e.
    LOOP AT I_MCHB.
    To get Material Doc. Details
          SELECT MBLNR
                 MJAHR
                 ZEILE INTO (MSEG-MBLNR,MSEG-MJAHR,MSEG-ZEILE)
                 UP TO 1 ROWS
                 FROM MSEG
                WHERE CHARG EQ I_MCHB-CHARG
                 AND  MATNR EQ I_MCHB-MATNR
                 AND  WERKS EQ I_MCHB-WERKS
                 AND  LGORT EQ I_MCHB-LGORT.
          ENDSELECT.
    Endloop.
    The program was taking 1 hr  for  20 k data
    2)The above statement was replaced by ALL ENTRIES to remove the SELECT-ENDSELECT from the loop.
    ***GET MATERIAL DOC NUMBER AND FINANCIAL YEAR DETAILS FROM MSEG TABLE
        SELECT MBLNR
               MJAHR
               ZEILE
               MATNR
               CHARG
               WERKS
               LGORT
                   INTO TABLE I_MSEG
                   FROM   MSEG
                   FOR ALL ENTRIES IN I_MCHB
                   WHERE CHARG EQ I_MCHB-CHARG
                   AND   MATNR EQ I_MCHB-MATNR
                   AND   WERKS EQ I_MCHB-WERKS
                   AND   LGORT EQ I_MCHB-LGORT.
    3)After getting the further technical analysis from BASIS team , And with the suggestion to optimize the program by changing the INDEX RANGE SCAN to
           MSEG~M.
    SELECT MBLNR
               MJAHR
               ZEILE
               MATNR
               CHARG
               WERKS
               LGORT
                   INTO TABLE  I_MSEG
                   FROM   MSEG
                   FOR ALL ENTRIES IN I_MCHB
                   WHERE MATNR EQ I_MCHB-MATNR
                   AND   WERKS EQ I_MCHB-WERKS
                   AND   LGORT EQ I_MCHB-LGORT.
    At present the program is taking 3 to 4 hrs in back ground .
    The table is complete table scan using index
    MSEG~M.
    Please suggest to improve the performance of this
    many many thanks
    deepak

    The benchmark should be the join, and I can not see how any of your solutions can be faster than the join
    SELECT   .....
                  INTO TABLE  ....
                  UP TO 1 ROWS
                  FROM mchb as a
                  INNER JOIN mseg as b
                  ON    amatnr EQ bmatnr
                  AND  awerks  EQ bwerks
                  AND  algort    EQ blgort
                  And   acharg  EQ bcharg
                  WHERE a~ ....
    The WHERE condition must come from the select on MCHB, the field list from the total results
    you want.
    If you want to compare, must compare your solutions plus the select to fill I_MCHB.
    Siegfried
    Edited by: Siegfried Boes  on Dec 20, 2007 2:28 PM

  • DYnamic select statement in JDBC adapter?

    Hi guys,
                 Is it possible so send dynamic select statement in jdbc adapter?
    XIer

    Aamir,
    The poster did not specify whether this was sender or receiver channel, but it would only make sense that a "dynamic query" must be on the receiver communication channel since if it was on the sender channel, the channel would have to intelligently determine how to do dynamic queries.
    Also, the poster asked if there was a way to "send a dynamic query" to the channel.  This seems to imply that the channel is receiving information from somewhere to determine the query, which could only mean it is a receiver channel.
    If you would like more information on the JDBC sender communication channel, please open a new thread.

  • Performance tunning for select statements using likp lips and vbrp

    Dear all,
      I have a report where i am using select statements using first on likp the for all entries of likp  i am taking data from lips and then for all entries in lips i am taking data from vbrp by matching VGBEL and VGPOS. Now the problem is that when it fetches data from vbrp it is taking lot of time around 13mins. to fetch data from vbrp. How can i overcome the problem.
    regards
    Amit

    Hi,
    there is also no secondary index for preceding document in VBFA table.
    You will also have to create it here.
    Regards,
    Przemysław

  • How to write SELECT statement using tables ekko,ekpo and eket?

    Hi,
    I got a problem in  performance tuning using below tables?
    how to write SELECT statement using tables EKKO,EKPO and EKET and in conditon ( WHERE clause)  use only fields 
                        ekko~ebeln       IN ebeln
                       ekko~loekz       EQ ' '
                       ekko~lifnr       IN lifnr
                       ekko~ekorg       IN ekorg
                      ekko~ekgrp       IN ekgrp          
                       ekpo~werks       IN werks
                       ekpo~pstyp       EQ  '3'
                       ekpo~loekz       EQ  space
                       ekpo~elikz       EQ  space
                       ekpo~menge       NE  0
                     eket~rsnum       NE space.
    Thanks in Advance.
    bye.

    Hi,
    ekko~ebeln IN ebeln
    ekko~loekz EQ ' '
    ekko~lifnr IN lifnr
    ekko~ekorg IN ekorg
    ekko~ekgrp IN ekgrp
    ekpo~werks IN werks
    ekpo~pstyp EQ '3'
    ekpo~loekz EQ space
    ekpo~elikz EQ space
    ekpo~menge NE 0          " Remove this from where clause
    eket~rsnum NE space.    " Remove this from where clause
    ' instead delete the entries after fetching into the table
    DELETE it_itab WHERE menge EQ '0' AND rsnum EQ ' '.
    Regards
    Bala Krishna

  • Retrieving multiple values from one column in SELECT statement

    Hi,
    I have a slight dilemma in that I'm trying to pull down all the values from a column from a select statement that includes some JOINS in it.
    If I run the query at the SQL Plus prompt, it pulls back all the values/rows.
    When I run the select (and prepared ) statement in my JSP, it only pulls back one of the 4 values I'm trying to retrieve.
    e.g.
    at the DB level :
    SELECT role_name, CC_ID FROM votetbl a
    INNER JOIN APPROVERS b ON
    a.BUSVP = b.BUSVP AND
    a.BRANCH = b.BRANCH
    WHERE CC_ID = 1688this will return:
    ROLE_NAME CC_ID
    ops 1688
    ops 1688
    comply 1688
    legal 1688
    comply 1688
    When run in my JSP, like so:
    String primID3a = request.getParameter("primID");
    Statement stmtovoter = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    String prepvotSQL = "SELECT role_name, CC_ID FROM votetbl a INNER JOIN APPROVERS b ON a.BUSVP = b.BUSVP AND " +
                         "a.BRANCH = b.BRANCH WHERE CC_ID = ?";
    PreparedStatement prepvotstmt = connection.prepareStatement(prepvotSQL);
    prepvotstmt.setString(1, primID3a);
    ResultSet rest3 = prepvotstmt.executeQuery();
    rest3.next();
    String votecat = rest3.getString(1);
    out.println("Vote category: "+votecat);I only get ops returned.
    Do I need to run an enumerator? Or reqest.getParameterValues or use a while statement around the results set?
    Any feedback and direction here is welcomed!
    Thanks!

    Actually, I tried looping and still only get 1, but returned several times.
    i.e.
    PreparedStatement prepvotstmt = connection.prepareStatement(prepvotSQL);
    prepvotstmt.setString(1, primID3a);
    ResultSet rest3 = prepvotstmt.executeQuery();
    rest3.next();
    String votecat = rest3.getString(1);
    while (rest3.next()) {
    out.print("category roles "+votecat);
    }then I get returned the following:
    admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admin
    like so.
    Where as at the DB level I get
    ROLE_NAME CC_ID
    admin 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    risk 1688
    comply 1688
    legal 1688
    legal 1688
    ops 1688
    comply 1688
    Maybe the while should go around the getString(1) designation? But I was thinking I'd tried that and gotten invalid cursor error
    Something is definitely amiss, between the prepared statement in the servlet and the SELECT statement at the DB level.
    I can totally hardcode the statement in the servlet or JSP and it will return one value potentially several times, but only one.
    Other times, it will not return a value at all, even though one resides in the db.
    Yet go to the DB/SQL Plus prompt and it returns perfectly. I can simply copy and paste the SELECT statement from the out.print line I made and it works like a champ in SQL Plus. Any ideas why the same exact thing cannot return the proper values within the servlet/JSP?
    Yeeeeeeesh!!! : (
    Message was edited by:
    bpropes20

  • How: making column value as column of select statement

    Hi
    Quickly I have searched in this forum for following solution but not able to find it.
    I need to make a query in such a way that the value of one column in one table should act as a column-name of another table
    Eg:-
    tab1
    col1,col2,*col3*,col4
    tab2
    col11 col22 col33 col44
    row1 a b col3 d
    row2 aa bb cc dd
    So the query should be something like --- in row2 if the value is col3 then from tab1 I should pick the col3 in select statement (basically there will be some join in tab1 and tab2 )
    Hope I am able to make u all understand my query.
    regards

    Hi all,
    Sorry for late response.Just now I checked all the replies.
    Actually I tried in this way.
    CREATE OR REPLACE function Proc_caption (in_tan varchar2, in_order in number)
    return varchar2
    is
    d varchar2(100) ;
    begin
    SELECT col1 into d
    from tab1
    Where
    col2 = in_tanid
    AND col3 = 'Y'
    AND col4 = in_order ;
    return d ;
    Exception
    WHen No_DATA_FOund then
    return 'N' ;
    end ;
    create or replace procedure proc_generate_view(in_tan varchar2, in_soc varchar2)
    is
    x varchar2(2000);
    v4 varchar2(50) ;
    v5 varchar2(50) ;
    cnt number ;
    begin
    v4:= PROC_Caption (in_tan,4) ;
    v5:= PROC_Caption (in_tan,5) ;
    x := ' Create view v_generate as '
    || ' SELECT a , b, c, d ' ;
    if v4 <> 'N' THEN
    x := x || ' , ' || PROC_Caption (in_tan,4) || ' as Caption4 ' ;
    end if;
    if v5 <> 'N' THEN
    x := x || ' , ' || PROC_Caption (in_tan,5) || ' as Caption5 ' ;
    end if;
    x := x || ' FROM tab2 WHERE col1 = ''' || in_socid || ''''
    || ' AND col2 = ''' || in_tan || '''' ;
    select count(1) into cnt from USER_OBJECTS where OBJECT_NAME = 'V_GENERATE'
    and OBJECT_TYPE = 'VIEW' ;
    if cnt > 0 then
    EXECUTE IMMEDIATE ' DROP view V_GENERATE' ;
    END IF ;
    execute immediate x ;
    end ;
    NOTE:- I have just renamed the table name and column names in order to make it non confedential...
    I have created this successfully with actual table name and column names and able to get the result as per my requirement.
    regards

  • Need help in how to combine select statement

    Hi,
    Table1 (VIEWREST2005)
    - ip
    - msg
    - fulldata
    - ID
    Table2 (L200505)
    - ip
    - msg
    - fulldata
    I want to create one sql that can select from table 2 to table number 1. This is my select statement, but it cannot running. The different between this 2 table is only column ID.
    insert into VIEWREST2005(ip,msg,fulldata) values(select ip, msg,fulldata from L200505)
    Can anyone modified my sql statement.

    Why do you not refer to the Oracle® Database SQL Reference manual? Or do you think your SQL Kung Fu is good enough that no RTFM'ing is needed?
    On-line copies of all Oracle documentation is available via http://tahiti.oracle.com/
    BTW, the correct syntax for this flavoured INSERT is:
    INSERT INTO table SELECT .. FROM table
    Drop the VALUES clause as no literal values are supplied.

  • SQL column as select statement to be referenced into a group by

    Is there a notation or solution to be able to reference a column that is a inline select statement within a group by as detailed below? The group by will not accept the alias. I also tried to make the SQL a MAX to remove the need for the group by reference and this returned invalid expression.
    SELECT DISTINCT hdr.BUSINESS_UNIT,
    hdr.SESSN_ID,
    hdr.STREAM_ROOT_ID,
    hdr.SESSN_STS_CD,
    hdr.SESSN_CRE_DTTM,
    CASE
    WHEN C.OPRID <> ' ' THEN C.OPRID
    ELSE S.OPERATOR
    END OPRID,
    strm.QS_APP_CONTEXT,
    RECV.QTY_SH_RECVD Quantity_Received,
    CASE
    WHEN hdr.BUSINESS_UNIT = 'MFG01' THEN MAX(G.MFDS_SGRP_SIZE)
    ELSE MAX(S.SESSN_SGRP_SIZE)
    END Quantity_Inspected,
    MAX(S.QS_VALUEREADING_1) Defect_Count,
    CASE
    WHEN MAX(S.QS_VALUEREADING_1) = 0 THEN ' '
    ELSE MAX(G.MFDS_NAME)
    END Characteristic,
    MAX(CMNT.QS_COMMENT2) COMMENTS,
    strm.INV_ITEM_ID,
    itm.DESCR,
    strm.WORK_CENTER_CODE,
    strm.VENDOR_ID,
    *(SELECT V.NAME1 FROM PS_VENDOR V WHERE strm.VENDOR_ID = V.VENDOR_ID AND V.SETID = (SELECT SETID FROM PS_SET_CNTRL_REC*
    WHERE  RECNAME = 'VENDOR'
    AND SETCNTRLVALUE = strm.BUSINESS_UNIT)) VENDOR_NAME,
    strm.PRDN_AREA_CODE,
    strm.COMPL_OP_SEQ,
    strm.PRODUCTION_TYPE,
    C.RECEIVER_ID,
    C.RECV_LN_NBR,
    RECV.PO_ID,
    RECV.LINE_NBR,
    RECV.SCHED_NBR,
    C.PRODUCTION_ID,
    C.SERIAL_ID,
    C.INV_LOT_ID
    FROM PS_QS_SESSN_HDR8 hdr
    LEFT OUTER JOIN PS_QS_SESSN_TRACE8 C
    ON hdr.BUSINESS_UNIT = C.BUSINESS_UNIT
    AND hdr.SESSN_ID = C.SESSN_ID
    LEFT OUTER JOIN PS_RECV_INSPDTL_VW RECV
    ON C.BUSINESS_UNIT = RECV.BUSINESS_UNIT
    AND C.RECEIVER_ID = RECV.RECEIVER_ID
    AND C.RECV_LN_NBR = RECV.RECV_LN_NBR
    LEFT OUTER JOIN PS_QS_STREAM_ROOT strm
    ON hdr.STREAM_ROOT_ID = strm.STREAM_ROOT_ID
    AND hdr.BUSINESS_UNIT = strm.BUSINESS_UNIT
    LEFT OUTER JOIN PS_QS_STREAM8_VW G
    ON strm.STREAM_ROOT_ID = G.STREAM_ROOT_ID
    AND strm.BUSINESS_UNIT = G.BUSINESS_UNIT
    LEFT OUTER JOIN PS_QS_SUBGROUP S
    ON hdr.BUSINESS_UNIT = S.BUSINESS_UNIT
    AND hdr.SESSN_ID = S.SESSN_ID
    AND S.STREAM_ID = G.STREAM_ID
    LEFT OUTER JOIN PS_QS_SESSN_COMM8 CMNT
    ON S.BUSINESS_UNIT = CMNT.BUSINESS_UNIT
    AND S.SESSN_ID = CMNT.SESSN_ID
    AND S.STREAM_ID = CMNT.STREAM_ID
    AND C.SAMPLE = CMNT.SAMPLE
    LEFT OUTER JOIN PS_MASTER_ITEM_TBL itm
    ON itm.INV_ITEM_ID = strm.INV_ITEM_ID
    LEFT OUTER JOIN PS_SET_CNTRL_REC cntrl
    ON itm.SETID = cntrl.SETID
    AND cntrl.RECNAME = 'MASTER_ITEM_TBL'
    AND cntrl.SETCNTRLVALUE = strm.BUSINESS_UNIT
    WHERE S.QS_VALUEREADING_1 = (SELECT MAX(S2.QS_VALUEREADING_1)
    FROM PS_QS_SUBGROUP S2
    WHERE S2.BUSINESS_UNIT = S.BUSINESS_UNIT
    AND S2.SESSN_ID = S.SESSN_ID
    AND S2.STREAM_ID = S.STREAM_ID)
    GROUP BY hdr.BUSINESS_UNIT,
    hdr.SESSN_ID,
    hdr.STREAM_ROOT_ID,
    hdr.SESSN_STS_CD,
    hdr.SESSN_CRE_DTTM,
    C.OPRID,
    S.OPERATOR,
    strm.QS_APP_CONTEXT,
    RECV.QTY_SH_RECVD,
    strm.INV_ITEM_ID,
    itm.DESCR,
    strm.WORK_CENTER_CODE,
    strm.VENDOR_ID,
    VENDOR_NAME,
    strm.PRDN_AREA_CODE,
    strm.COMPL_OP_SEQ,
    strm.PRODUCTION_TYPE,
    C.RECEIVER_ID,
    C.RECV_LN_NBR,
    RECV.PO_ID,
    RECV.LINE_NBR,
    RECV.SCHED_NBR,
    C.PRODUCTION_ID,
    C.SERIAL_ID,
    C.INV_LOT_ID

    Hi,
    Assign the alias in a sub-query. Then you'll be able to use it wherever you want to, and how many times you want to, in a super-query.
    For example:
    WITH     got_vendor     AS
         SELECT     hdr.business_unit
                  SELECT  v.name1
                  FROM    ps_vendor     v
                  WHERE   strm.vendor_id     = v.vendor_id
                  AND     v.setid          = (
                                                SELECT  setid
                                        FROM    ps_set_cntrl_rec
                                        WHERE   recname          = 'VENDOR'
                                        AND     setcntrlvalue      = strm.business_unit
              )           AS vendor_name
         FROM      ps_qs_sessn_hdr8     hdr
    SELECT       business_unit          -- NOTE: no hdr.; all columns are from got_vendor now
    ,       vendor
    FROM       got_vendor
    GROUP BY  business_unit
    ,       vendor
    ;When you define an alias (such as vendor) in a query, you can use that alias in the ORDER BY clause of that same query, but that's the only place in that same query where you can use it. If you want to use the alias anywhere else (e.g., in the GROUP BY clause, as in your example, the WHERE clause, or elsewhere in the SELECT clause), then you probably want to compute it in a sub-query, as shown above.
    There's probably a better way to compute vendor, but that's a separate problem.
    Edited by: Frank Kulash on Jan 3, 2012 10:37 AM
    Added example

  • How to Use COLUMN NOPRINT - need to exclude one column from Select *

    Dear Friends,
    I need to exclude one column from a SELECT * query. Everytime the column data type is BLOB, I dont' want it to be part of my SELECT. After googling I found some info about NOPRINT but it doesn't seem to be working in my case. May be I am using it incorreclty.
    COLUMN FILE_DESC NOPRINT
    SELECT * FROM FILES;
    Where FILE_DESC is of BLOB datatype.Can I use it in my SELECT or it has to be used in Dynamic SQL? Is there any other option to achieve this?
    Thanks in advance.

    Hi,
    COLUMN FILE_DESC NOPRINT
    affects all queries in the same SQL*Plus session (unless you cancel it with a COLUMN FILE_DESC PRINT command.)  It doesn't matter if those queries are static or dynamic.  As mentioned before, COLUMN is a SQL*Plus command.  If you using a different front end, then it may have a different way to hide specific output columns.
    Did you have a poroblem when you tried it?  Post a complete test script that the people who want to help you can use to re-create the problem and test their ideas.
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Columns in Select Statement

    Does the column selected in the select statement will effect the table access. I have a query selecting 10 columns from different tables using joins and inline views. One table is going for a Full table Scan.
    When I searched for the cause, I couldn't find anything. Everything looks correct. When I comment 2 two particular columns from the select statement the table is not scanned fully.
    Those two columns are not the part of the index. Why does a selection of columns affect the Explain plan?
    Thanks,
    GM

    Hi Gints,
    Thank you for your reply. This is my query and
    nvl(TICKET_JOIN.TDQRLV,0) ACC_SHIPPED_QTY,
    TICKET_JOIN.TDSOQS QUANTITY_TICKETED are the columns tha's creating issue. If I comment those columns Index is accessed properly.
    select
    'TKT' SOURCE,
    TICKET_JOIN.TKDO01 HIRE_ID,
    TICKET_JOIN.TKQ101 TRUCK_ID,
    TICKET_JOIN.TKVEHT TRUCK_TYPE,
    1 TRUCK_COMM,
    nvl(TKCMP1,0) TICKET_NUM,
    nvl(TKADTM,0) TICKET_TIME,
    --TICKET_JOIN.TDSOQS QUANTITY_TICKETED,
    0 CHECKIN_TIME,
    --nvl(TICKET_JOIN.TDQRLV,0) ACC_SHIPPED_QTY,
    nvl(DDADTM,0) START_TIME
    from
    (select
    TICKET.TKCMP1,
    TICKET.TKDO01,
    TICKET.TKQ101,
    TICKET.TKADTM ,
    TICKET.TKVEHT,
    TICKET_DETAILS.TDAITM ,
    TICKET_DETAILS.TDQRLV ,
    TICKET_DETAILS.TDSOQS ,
    TICKET.TKCNTF,
    TICKET.TKTRDJ,
    TICKET.TK58GA8
    from
    CRPDTA.F5800091 TICKET_DETAILS ,
    CRPDTA.F5800090 TICKET
    where TICKET.TKCMP1 = TICKET_DETAILS.TDCMP1
    and TICKET.TKTRDJ = TICKET_DETAILS.TDTRDJ
    and TICKET.TKTRDJ = 107085
    and TICKET.TKEV12 <> 'Y'
    and TICKET.TK58GA8='ECSEO'
    and TICKET.TKCNTF = '11') TICKET_JOIN ,
    (select
    DDDOCO,
    DDCNTF,
    DDQTFN,
    DDAITM,
    DDADTM,
    DD58GA8,
    DDTRDJ
    from
    CRPDTA.F5800051 ORDER_DETAILS,
    CRPDTA.F5800050 ORDER_HEADER
    where
    ORDER_HEADER.DHDOCO = ORDER_DETAILS.DDDOCO
    and ORDER_HEADER.DHTRDJ = ORDER_DETAILS.DDTRDJ
    and ORDER_HEADER.DH58GA8 = ORDER_DETAILS.DD58GA8
    and ORDER_HEADER.DHDCTO = ORDER_DETAILS.DDDCTO
    /*and
    (ORDER_HEADER.DHTRDJ = 107085
    OR (ORDER_HEADER.DHTRDJ = 107084 and ORDER_HEADER.DHEV04='Y')
    and TRIM(ORDER_HEADER.DH58GA8) = 'ECSEO'
    and TRIM(ORDER_DETAILS.DDCNTF) = '11' ) ORDER_VIEW
    where TICKET_JOIN.TKTRDJ = ORDER_VIEW.DDTRDJ
    and TICKET_JOIN.TDAITM = ORDER_VIEW.DDAITM
    and TICKET_JOIN.TKCNTF = ORDER_VIEW.DDCNTF
    and TICKET_JOIN.TK58GA8 = ORDER_VIEW.DD58GA8
    and NOT EXISTS ( select 1 from CRPDTA.F5800120 TRUCK_ASSIGNMENT
    where TATRDJ = 107085
    and TACNTF = '11'
    and TA58GA8 = 'ECSEO'
    and TICKET_JOIN.TKQ101||TICKET_JOIN.TKVEHT = TAQ101||TAVEHT )
    Thanks
    GM

  • Adding columns in select statements

    All if i have the following statement and i wanted to add the two volume columns in the select statement can i just do a A1.volume + A2.Volume as vol
    SELECT A1.ORDERID,A1.MARKET,A1.GIMSG, A2.ORDERID,A2.MARKET,A2.TRADERID, A1.VOLUME, A2.VOLUME
    FROM table1 A1 JOIN table2
      ON A1.TRADEDATE = A2.TRADEDATE

    No that wouldnt work,
    Error will be invalid no(error no ORA-01722)
    but you can use pipe(||)
    select col1||col2 as col from ......
    ex: SQL> select e.ename||d.dname as result_col from emp e,dept d where e.deptno=d.deptno;
    RESULT_COL
    SMITHRESEARCH
    ALLENSALES
    WARDSALES
    JONESRESEARCH
    MARTINSALES
    BLAKESALES
    CLARKACCOUNTING
    SCOTTRESEARCH
    KINGACCOUNTING
    TURNERSALES
    ADAMSRESEARCH
    RESULT_COL
    JAMESSALES
    FORDRESEARCH
    MILLERACCOUNTING
    14 rows selected.
    Message was edited by:
    user517498

  • How to use a table name in the select statement using a variable?

    Hi Everybody,
                       I got a internal table which has a field or a variable that gets me some tables names. Now I need to retrieve the data from all these tables in that field dynamically at runtime. So could you suggest me a way out to use the select query which uses this variable as a table ?
    Regards,
    Mallik.

    Hi all,
    Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
    for ex : select * from (tab_name) where....?
    Can we do inner join on such select statements? If so how?
    Thanks & Regards,
    Mallik.

  • Need to execute Long Insert (6000 characters)statement using dbms_sql.parse

    I built an insert statement which is more than 6000 (six thousand) characters stored into two varchar2 variables. I need to execute the statement using dbms_sql.parse.
    I tryed using dbms_sql.varchar2s variable and having no success.
    Any ideas or examples?
    Thanks
    JK

    6000 chars shouldn't be a problem.
    What do you mean with no success?Did you get any error?
    Any ideas or examples?See this thread
    Re: execute immediate with a string longer than 32767

  • Parameters in select statement in JDBC Sender Adapter

    Hi,
    Is it possible to construct a SQL select statement with some parameters (for example: #currentdate )?
    (for sender JBDC adapter)
    Thank you

    hi,
    you can very well construct a select statement.
    The Source data type should be of this format:
    <resultset>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    <row>
    <column-name1>column-value</ column-name1>
    <column-name2>column-value</ column-name2>
    <column-name3>column-value</ column-name3>
    </row>
    </resultset>
    try this link:
      http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    regards,
    Priyanka

Maybe you are looking for

  • Can this be a scam?

    Charles Adu Darko nori pridėti jus į „Skype“ FROM THE OFFICE OF: DJABANOR & CO. LAW CHAMBER, HOUSE NO. 505/4 KWAME NKRUMAH AVENUE NEAR ROXY CINEMA, ADABRAKA ACCRA GHANA. [e-mail removed for privacy and security] Dear Trumpickas, I am very sorry for t

  • Forms migration

    We want some information regarding forms 9i. At present, our applications are developed in D2k. We wish to migrate to oracle forms 9i. I hope we have to first migrate to forms 6i and then to forms 9i. In this regard, we came to know about migration a

  • Acknowledgement for R/3 - XI scenario (IDOC)

    I am sending MATMAS04 idoc to XI and I need to get the acknowledgement back.. I am following the steps as in this weblog, /people/saravanakumar.kuppusamy2/blog/2005/01/20/configuration-tips-for-a-business-serviceintegration-process-to-send-back-ale-a

  • Email content issue

    Hi Experts, I've got a question with regard to the content of mails. After opening the Manager IC role, we open the email workbench. From that location emails get send to specific agents. However, sometimes the content of the mail can be seen in the

  • Bridge thumbnail poorly displays PS text layer

    In Bridge, even with High Quality thumbnails preview set, Photoshop Text Layers (non rasterized) preview horribly. I would like to use the Bridge thumbnail (in a large Preview Panel) as a slide for a PS presentation; and would prefer not to open the