SQL dateFormat Query

Hi All,
I have a sql query which returns me the start and end time of certain process, i just need another output being displayed beside, which gives me the difference of end time and start time, im able to do that by just subtracting end time minus start time, but the difference returns me null.
i have pasted the query below,
select PROCESS.START_TIME, PROCESS.END_TIME, (PROCESS.END_TIME-PROCESS.START_TIME)As Difference from DOCKETS_PUB.PROCESS
this difference column returns me null, im doing this in a dbvisualizer.
Any help on this would be appreciated.
Thanks,
Nandhini

993901 wrote:
Hi All,
I have a sql query which returns me the start and end time of certain process, i just need another output being displayed beside, which gives me the difference of end time and start time, im able to do that by just subtracting end time minus start time, but the difference returns me null.
i have pasted the query below,
select PROCESS.START_TIME, PROCESS.END_TIME, (PROCESS.END_TIME-PROCESS.START_TIME)As Difference from DOCKETS_PUB.PROCESS
this difference column returns me null, im doing this in a dbvisualizer.
Any help on this would be appreciated.
Thanks,
NandhiniWhat are the data types of END_TIME and START_TIME?
Show (copy and paste) the results from a sqlplus command prompt ... cut out the possibility of your client doing something for/to you.

Similar Messages

  • Oracle SQL Select query takes long time than expected.

    Hi,
    I am facing a problem in SQL select query statement. There is a long time taken in select query from the Database.
    The query is as follows.
    select /*+rule */ f1.id,f1.fdn,p1.attr_name,p1.attr_value from fdnmappingtable f1,parametertable p1 where p1.id = f1.id and ((f1.object_type ='ne_sub_type.780' )) and ( (f1.id in(select id from fdnmappingtable where fdn like '0=#1#/14=#S0058-3#/17=#S0058-3#/18=#1#/780=#5#%')))order by f1.id asc
    This query is taking more than 4 seconds to get the results in a system where the DB is running for more than 1 month.
    The same query is taking very few milliseconds (50-100ms) in a system where the DB is freshly installed and the data in the tables are same in both the systems.
    Kindly advice what is going wrong??
    Regards,
    Purushotham

    SQL> @/alcatel/omc1/data/query.sql
    2 ;
    9 rows selected.
    Execution Plan
    Plan hash value: 3745571015
    | Id | Operation | Name |
    | 0 | SELECT STATEMENT | |
    | 1 | SORT ORDER BY | |
    | 2 | NESTED LOOPS | |
    | 3 | NESTED LOOPS | |
    | 4 | TABLE ACCESS FULL | PARAMETERTABLE |
    |* 5 | TABLE ACCESS BY INDEX ROWID| FDNMAPPINGTABLE |
    |* 6 | INDEX UNIQUE SCAN | PRIMARY_KY_FDNMAPPINGTABLE |
    |* 7 | TABLE ACCESS BY INDEX ROWID | FDNMAPPINGTABLE |
    |* 8 | INDEX UNIQUE SCAN | PRIMARY_KY_FDNMAPPINGTABLE |
    Predicate Information (identified by operation id):
    5 - filter("F1"."OBJECT_TYPE"='ne_sub_type.780')
    6 - access("P1"."ID"="F1"."ID")
    7 - filter("FDN" LIKE '0=#1#/14=#S0058-3#/17=#S0058-3#/18=#1#/780=#5#
    8 - access("F1"."ID"="ID")
    Note
    - rule based optimizer used (consider using cbo)
    Statistics
    0 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    0 bytes sent via SQL*Net to client
    0 bytes received via SQL*Net from client
    0 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    9 rows processed
    SQL>

  • Sql select query problem

    hi friends,
    i've a view called "risk_efforts" with fields user_id,user_name,wknd_dt,week_day,prod_efforts,unprod_efforts.
    Name Type
    ROW_ID NUMBER
    USER_ID VARCHAR2(14)
    USER_NAME VARCHAR2(50)
    WKND_DT VARCHAR2(8)
    WEEK_DAY VARCHAR2(250)
    PROD_EFFORTS NUMBER
    UNPROD_EFFORTS NUMBER
    data is like this:
    when there is some data in prod_efforts, unprod_efforts will be null
    when there is some data in unprod_efforts, prod_efforts will be null
    for example:
    USER_ID     USER_NAME     WKND_DT     WEEK_DAY     PROD_EFFORTS     UNPROD_EFFORTS
    G666999     GTest     20100403     TUE     null 3
    G666999     GTest     20100403     TUE     14     null
    now i want to combine these 2 rows into 1 row i.e o/p should be like this
    USER_ID     USER_NAME     WKND_DT     WEEK_DAY     PROD_EFFORTS     UNPROD_EFFORTS
    G666999     GTest     20100403     TUE     14 3
    i've tried all combinations but couldn't get the query. Please help me with the exact SQL select query.
    thanks,
    Girish

    Welcome to the forum.
    First read this:
    Urgency in online postings
    Secondly, it's always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
    You have provided #3 and #4. However with no usable form of sample data forum members will often not respond as quickly as they could if you provided #2.
    I'm just wagering a guess here but what about this:SELECT ROW_ID
    , USER_ID
    , WKND_DT
    , WEEK_DAY
    , MAX(PROD_EFFORTS) AS PROD_EFFORTS
    , MAX(UNPROD_EFFORTS) AS UNPROD_EFFORTS
    FROM RISK_EFFORTS
    GROUP BY ROW_ID
    , USER_ID
    , WKND_DT
    , WEEK_DAY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to capture all the rows returned from a sql select query in CPO

    Hi,
      I am executing an sql select query which returns multiple rows. I need to capture the values of each row to specific variables. How do I proceed.
    Thanks,
    Swati

    The select activities  ("Select from Oracle," Select from SQL Server," etc.) against database already return tables.  Use one of the database adapters to do your select, and it will already be in a table form.  Just put your query in the select and identify the columns in your result table. The online help or the database adapter guides in the product documentation can help.

  • Reg: SQL select Query in BPEL process flow

    <p>
    Hi,
    I am suppose to execute a SQL select query (in BPEL Process flow) as mention below in JDeveloper using Database adapter.
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;xyz&gt;
    </p>
    <p>
    AND OBJECT= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    <strong>Now my question is:
    1.</strong> What does this "*" refer to in the query and how can I retrieve the value of LENGTH*WIDTH* HEIGHT from the query where LENGTH,WIDTH and HEIGHT are the individual field in the table.
    2.What does this " AS" refer to? If " ITEM_CUBE " is the alies for the table name "ITEM" to retrieve the value, then query shoud be evaluated as
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE <strong>ITEM_CUBE.ITEM</strong>= &lt;xyz&gt;
    </p>
    <p>
    AND <strong>ITEM_CUBE.OBJECT</strong>= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    Is my assumption correct?
    Please suggest asap.
    Thanks...
    </p>
    <p>
    </p>

    Hi
    Thank for your reply!
    I have a nested select query which performs on two different table as shown below:
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;abc&gt;
    </p>
    <p>
    AND OBJECT= (SELECT NAME FROM SUPPLIER WHERE ITEM=&lt;Item&gt; AND SUPP_IND = &lsquo;Y')
    I am using DB adapter of Oracle JDeveloper in BPEL process flow, where I can able to select only one master table in DB adapter say SUPPLIER and its attributes at a time.But as per my requirment I need to select both the table (CUBE and SUPPLIER) in a single adapter to execute my query.
    It can be achievable by using two DB adapter , One to execute the nested query and another to execute the main qyery considering value of nested query as a parameter.But I want to achieve it by using a single one.
    Am I correct with my concept?
    Please suggest how to get it ?
    </p>
    Edited by: user10259700 on Oct 23, 2008 12:17 AM

  • From SharePoint Content Database, Using SQL-Server Query how to fetch the 'Document GUID' based on 'Content Type'

    I want to get all the documents based on content type using SQL Server Query. I know that, querying the content database without using API is not advisable, but still i want to perform this action through SQL Server Query. Can someone assist ?

    You're right, it's not advisable, may result in corruption of your databases and might impact performance and stability. But assuming you're happy to do that then it is possible.
    Before you go down that route, have you considered using something more safe like PowerShell? I've seen a script exactly like the one you describe and it would take far less time to do it through PS than it would through SQL.

  • Sql server query

    sql server query to rearrange the rows after inserting the rows in a table

    You want to re-arrange the data physically?!!! Why? I believe its something impossible other than having a clustered key(there could be some strange ways of doing it) and a thing that should not worry about. Always there is a ORDER BY CLAUSE to order your
    data while retrieving 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Sql developer query window corrupting on scroll

    Hi there
    I have a weird error - when I scroll in my SQL developer query window (tab) the text corrupts and only comes back if I click in the window somewhere or save. Has anyone else seen this? I'm on version 1.5.5 and don't really want to upgrade to the latest as I don't like the new layout (no dbmsoutput etc in the results window)
    Cheers, Kate

    sorted it by adding a line AddVMOption -Dsun.java2d.noddraw=true to the sqldeveloper.conf file, as per thread SQL Editor not refreshing after scroll on Windows Vista

  • PL/SQL spatial query will not compile.

    I have a PL/SQL spatial query that will not compile, but the equivalent SQLPlus query works fine. I.e. (convert decimal degrees to degrees,minutes,seconds)
    Any thoughts much appreciated....
    THIS WORKS in SQLPlus
    select
    decode(rownum,1,decode(sign(b.column_value),-1,'W','E'),2,decode(sign(b.column_v
    alue),-1,'S','N'))&#0124; &#0124;
    to_char(abs(trunc(b.column_value,0)),'999')
    &#0124; &#0124;to_char(abs(trunc((b.column_value - trunc(b.column_value,0)) * 60,0)),'99')
    &#0124; &#0124;to_char(abs(
    (((b.column_value - trunc(b.column_value,0)) * 60) - trunc((b.column_value - tru
    nc(b.column_value,0)) * 60,0)) * 60
    ),'99.99')
    from route_location a, table(a.line.sdo_ordinates) b
    where a.route_adms_id = 13820370
    and record_seq_num = 26
    and rownum < 3
    BUT THIS DOES NOT
    ADMS>create or replace procedure PKG_route_loc_latlong_ins
    2 (iADMS_ID in INTEGER, iRSN in INTEGER,
    3 vcLAT out VARCHAR2, vcLONG out VARCHAR2) as
    4 cursor c1 is
    5 select decode(rownum,1,decode(sign(b.column_value),-1,'W','E'),
    6 2,decode(sign(b.column_value),-1,'S','N'))
    7 &#0124; &#0124;to_char(abs(trunc(b.column_value,0)),'999')
    8 &#0124; &#0124;to_char(abs(trunc((b.column_value - trunc(b.column_value,0)) * 60,0)),
    '99')
    9 &#0124; &#0124;to_char(abs(
    10 (((b.column_value - trunc(b.column_value,0)) * 60) -
    11 trunc((b.column_value - trunc(b.column_value,0)) * 60,0)) * 60
    12 ),'99.99')
    13 from route_location a, table(a.line.sdo_ordinates) b
    14 where a.route_adms_id = iADMS_ID
    15 and a.record_seq_num = iRSN
    16 and rownum < 3;
    17 BEGIN
    18 open c1;
    19 fetch c1 into vcLONG;
    20 fetch c1 into vcLAT;
    21
    22 EXCEPTION
    23 when others then
    24 vcLAT := 'ERROR';
    25 RAISE_APPLICATION_ERROR(-20002,
    26 'XXXXXXXXXXXXXX ');
    27
    28 END pkg_route_loc_latlong_ins;
    29 /
    Warning: Procedure created with compilation errors.
    ADMS>
    ADMS>show errors
    Errors for PROCEDURE PKG_ROUTE_LOC_LATLONG_INS:
    LINE/COL ERROR
    5/5 PL/SQL: SQL Statement ignored
    5/12 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    5/12 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    13/34 PLS-00201: identifier 'A.LINE' must be declared
    19/5 PL/SQL: SQL Statement ignored
    20/5 PL/SQL: SQL Statement ignored
    null

    try a
    FOR UPDATE OF ID NOWAIT;where ID is the name of a column in the table.

  • How to tune the performance of Oracle SQL/XML query?

    Hi all,
    I am running Oracle 9i and like to run the following Oracle SQL/XML query. It takes about 3+ hour and still not finish. If I get rid all the XML stuffs it only take minutes to run. Does anybody know how to what's the reason of this slow and how to tune it?
    SELECT XMLElement("CUSTOMER",
    XMLForest(C_CUSTKEY "C_CUSTKEY", C_NAME "C_NAME", C_ADDRESS "C_ADDRESS", C_PHONE "C_PHONE", C_MKTSEGMENT "C_MKTSEGMENT", C_COMMENT "C_COMMENT"),
    (SELECT XMLAgg(XMLElement("ORDERS",
    XMLForest(O_ORDERKEY "O_ORDERKEY", O_CUSTKEY "O_CUSTKEY", O_ORDERSTATUS "O_ORDERSTATUS", O_ORDERPRIORITY "O_ORDERPRIORITY", O_CLERK "O_CLERK", O_COMMENT "O_COMMENT"),
    (SELECT XMLAgg(XMLElement("LINEITEM",
    XMLForest(L_ORDERKEY "L_ORDERKEY", L_RETURNFLAG "L_RETURNFLAG", L_LINESTATUS "L_LINESTATUS", L_SHIPINSTRUCT "L_SHIPINSTRUCT", L_SHIPMODE "L_SHIPMODE", L_COMMENT "L_COMMENT")
    FROM LINEITEM
    WHERE LINEITEM.L_ORDERKEY = ORDERS.O_ORDERKEY)
    FROM ORDERS
    WHERE ORDERS.O_CUSTKEY = CUSTOMER.C_CUSTKEY)
    FROM CUSTOMER ;
    Thanks very much in advance for your time,
    Jinghao Liu

    ajallen wrote:
    Why not something more like
    SELECT *
    FROM fact1 l,
    FULL OUTER JOIN fact1 d
    ON l.company = d.company
    AND l.transactiontypeid = 1
    AND d.transactiontypeid = 2;
    Because this is not an equivalent of the original query.
    drop table t1 cascade constraints purge;
    drop table t2 cascade constraints purge;
    create table t1 as select rownum t1_id from dual connect by level <= 5;
    create table t2 as select rownum+2 t2_id from dual connect by level <= 5;
    select * from (select * from t1 where t1_id > 2) t1 full outer join t2 on (t1_id = t2_id);
    select * from t1 full outer join t2 on (t1_id = t2_id and t1_id > 2);
         T1_ID      T2_ID
             3          3
             4          4
             5          5
                        6
                        7
         T1_ID      T2_ID
             1
             2
             3          3
             4          4
             5          5
                        6
                        7

  • How to perf tune Oracle SQL/XML query?

    Hi all,
    I am using Oracle 9i and like to run the following Oracle SQL/XML query. It takes about 3+ hour and still not finish. If I get rid all the XML stuffs it only take minutes to run. Does anybody know how to what's the reason of this slow and how to tune it?
    SELECT XMLElement("CUSTOMER",
    XMLForest(C_CUSTKEY "C_CUSTKEY", C_NAME "C_NAME", C_ADDRESS "C_ADDRESS", C_PHONE "C_PHONE", C_MKTSEGMENT "C_MKTSEGMENT", C_COMMENT "C_COMMENT"),
    (SELECT XMLAgg(XMLElement("ORDERS",
    XMLForest(O_ORDERKEY "O_ORDERKEY", O_CUSTKEY "O_CUSTKEY", O_ORDERSTATUS "O_ORDERSTATUS", O_ORDERPRIORITY "O_ORDERPRIORITY", O_CLERK "O_CLERK", O_COMMENT "O_COMMENT"),
    (SELECT XMLAgg(XMLElement("LINEITEM",
    XMLForest(L_ORDERKEY "L_ORDERKEY", L_RETURNFLAG "L_RETURNFLAG", L_LINESTATUS "L_LINESTATUS", L_SHIPINSTRUCT "L_SHIPINSTRUCT", L_SHIPMODE "L_SHIPMODE", L_COMMENT "L_COMMENT")
    FROM LINEITEM
    WHERE LINEITEM.L_ORDERKEY = ORDERS.O_ORDERKEY)
    FROM ORDERS
    WHERE ORDERS.O_CUSTKEY = CUSTOMER.C_CUSTKEY)
    FROM CUSTOMER ;
    Thanks very much in advance for your time,
    Jinghao Liu

    Please post this message at:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

  • Using SQL in Query in 3.0.0

    I'm very happy to see this feature added to 3.0.0 along with methodQL. This
    should alleviate a lot of the issues with trying to use only JDOQL,
    especially when the desired SQL statemetn is well understood. Thanks for
    adding this!
    Ben

    Marc,
    Calling pm.flush() explicitly doesn't help. Calling
    query.setIgnoreCache(true) does work, so that's good.
    I even get the correct number of rows back in the Collection. Unfortunately
    every item in the Collection is null. I definitely did a
    query.setClass(DSChannelValueImpl.class) and it is enhanced properly,
    because that's how the table got populated earlier in the test. I am doing a
    SELECT *, so the class indicator and pk should be there. I'm assuming it
    doesn't mind me aliasing the FROM table name, since I need to disambiguate
    it to do a join (below).
    Ben
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Ben-
    I've made a bug report for this:
    http://bugzilla.solarmetric.com/show_bug.cgi?id=780
    In the meantime, a nicer workaround will probably be to just call
    setIgnoreCache(true) on the Query.
    In article <[email protected]>, Marc Prud'hommeaux wrote:
    Ben-
    A potential (but, admittedly, not very nice) workaround for this for the
    time being might be to enable NonTransactionalRead=true, and ensure that
    there is not a transaction running at the time of query execution.
    In article <[email protected]>, Patrick Linskey wrote:
    Well, sounds like a bug. We'll take a look. Sorry about that.
    What happens if you explicitly flush the PM before execution?
    -Patrick
    Ben Eng wrote:
    Query query = pm.newQuery( "kodo.jdbc.SQL", null );
    query.setClass( ChannelValue.class );
    query.declareParameters( "VARCHAR pConn, DATETIME pStart,
    DATETIME pEnd" );
    String filter = "select * from dschannel as c" +
    " left join channelsegment as s" +
    " on c.pk = s.channel and" +
    " c.supporting = pConn and" +
    " (s.validForEnd > pStart or" +
    " s.validForStart < pEnd)" +
    " where s.channel is null";
    query.setFilter( filter );
    Collection resultSet = (Collection) this.query.execute(
    connection, start, end );
    This is being called from a method of a stateless session bean that is
    only
    performing this query. CMT, Required, and the client is not definingits own
    transaction boundaries. Therefore, I would not expect anything to bedirtied
    in this transaction. This is with the BEA WLS 7.0 appserver.
    Ben
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    Ben,
    Can you post the code that you're using to create the query?
    -Patrick
    Ben Eng wrote:
    I just ran into a snag with this feature.
    kodo.util.UnsupportedOptionException: kodo.jdbc.SQL language queries
    cannot
    be executed in-memory. Either set the javax.jdo.option.IgnoreCacheproperty
    to true, set the kodo.FlushBeforeQueries property to true, or executethe
    query before modifying objects within the transaction.
    at
    kodo.jdbc.query.SQLQuery.newInMemoryQueryExecutor(SQLQuery.java:117)
    at kodo.query.AbstractQuery.internalCompile(AbstractQuery.java:545)
    atkodo.query.AbstractQuery.getAccessPathMetaDatas(AbstractQuery.java:938)
    >>>>
    atkodo.query.AbstractQuery.isAccessPathDirty(AbstractQuery.java:745)
    at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:672)
    at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:640)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:622)
    at
    com.metasolv.resources.queries.ChannelAvailabilityQueryBean.execute(ChannelA
    >>>>
    vailabilityQueryBean.java:84)
    at
    com.metasolv.oss.inventory.InventorySessionBean.queryInventory(InventorySess
    >>>>
    ionBean.java:1504)
    Oddly, my ra.xml already has the following properties set.
    <config-property>
    <description>If false, then the JDO implementation mustconsider
    modifications, deletions, and additions in the PersistenceManager
    transaction cache when executing a query inside a transaction. Else,the
    implementation is free to ignore the cache and execute the querydirectly
    against the data store.</description>
    <config-property-name>IgnoreCache</config-property-name>
    <config-property-type>java.lang.Boolean</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    <config-property>
    <description>Whether or not Kodo should automatically flush
    modifications to the data store before executingqueries.</description>
    >>>>>>
    <config-property-name>FlushBeforeQueries</config-property-name>
    <config-property-type>java.lang.String</config-property-type>
    <config-property-value>true</config-property-value>
    </config-property>
    I also tried explicitly calling ((KodoPersistenceManager)pm).flush()before
    newQuery to no avail. I am at a loss how to get the Query to NOT
    execute
    in-memory.
    Ben
    "Ben Eng" <[email protected]> wrote in message
    news:[email protected]...
    I'm very happy to see this feature added to 3.0.0 along with
    methodQL.
    >>>>>>
    This
    should alleviate a lot of the issues with trying to use only JDOQL,
    especially when the desired SQL statemetn is well understood. Thanks
    for
    adding this!--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Save layout of queries in SQL Developer query builder?

    Sometimes queries are very complex and moving tables around in the graphical view is really helpfull to better understand them.
    Unfortunately this layout does not get saved with "save" (because this is a simple text file).
    Once upon there was a query builder (included with designer 2000 and later vom 1991 to 1998) that had a proprietary format (.brw) to just do that: Save a query including layout.
    Any chance to save the layout of SQL Developer query builder queries?

    I dont think there is any way to save the layout for the query, you can request an enhancement on the Exchange for this http://sqldeveloper.oracle.com/
    But if you only need to restore the query you are working with later, or move it to another workstation and continue editing using the query builder, you only need the SQL code generated; when you paste it in an opened worksheet (on the same database or even a clone with the same structure) the query builder is able to resume working just fine with default positioning for the table objects.
    If you hand edit the query and insert some SQL manually then the query builder may stop working for particularly complex statements, in this case it will warn you and disable itself.

  • SQL trace query parameters round 2

    Hi,
    This is a follow up of this topic:
    SQL trace query parameters
    My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
    I have tried several approach including this:
    http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
    Any idea why it isn't working? (I'm using Oracle XE 11g)
    Thanks

    user610868 wrote:
    Hi,
    This is a follow up of this topic:
    SQL trace query parameters
    My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
    I have tried several approach including this:
    http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
    Any idea why it isn't working? (I'm using Oracle XE 11g)
    Thankshttp://www.lmgtfy.com/?q=oracle+sql_trace+level=4

  • Adding columns in a open sql select query

    Hi Everyone,
    I would like to add the values of n columns of a table and place them in one column, how can i achieve this in open sql.
    In oracle native sql the query will look like this:
    Select col1 + col2 + col3 AS col
    from tab1;
    On a similar grounds, i would like to concatenate the contents of n columns into one column. The oracle native sql will look like this:
    select col1 || col2 || col3
    from tab1;
    How can I do this in Open SQL.
    Thanks in advance.
    Prabhu.

    Hi Prabhu,
    I'm afraid what you're trying to do is not possible using the Open SQL. You will have to get the data from all the three columns into an internal table and then write your own logic to accomplish the same.
    data : begin of itab occurs 0,
             col1 type i,
             col2 type i,
             col3 type i,
             col4 type i,
           end of itab.
    field-symbols: <fs_itab> like line of itab.
    SELECT COL1
           COL2
           COL3
      INTO TABLE ITAB.
    LOOP AT ITAB assigning <fs_itab>.
      <fs_itab>-col4 = <fs_itab>-col1 + <fs_itab>-col2 + <fs_itab>-col3.
    ENDLOOP.
    Regards,
    Anand Mandalika.

Maybe you are looking for

  • How  to add a new option for group by in a excel report

    Hi, there is a enhancement in a excel report I need to add a new option for group by help me Regards, Raghu

  • How to check the AIR runtime version?

    How can I check the AIR runtime version that is currently installed on the machine? Is there a properties file stored in the "Documents and Settings" Folder or something like that? Thanks in advance! Maik

  • Backspace key broke, replacement? (Satellite L10)

    Cleaning my keys and the backspace key broke. Satellite L10-281 Anyone help me out on how i would go about getting a replacement? Toshiba site useless can't find a single thing.

  • Workflow Qs: Using LT, Motion and FCP!

    Hi, getting all jumbled up on workflow. I am inserting motion projects direct on the timeline, but I want livetype titling in this project as well - the titles are part of the motion animation. I don't see where i can save a livetype style I have set

  • Drill down in obiee 10g

    Hi All, Is there any way when we drilldown a column instead of moving columns to the right side, we need it the columns to be moved to the bottom. Fro Example Country 4000 When we click on Country basically it wil give Country State1 300 ...........