What SQL statement is element JoinTables equivalent of?

Here is a example of JoinTables, I just can't understand how to join those tables together? I mean if the JoinTables is equivalent of :
select a.value,b.value,c.value
from v_binlog_cache_size a,v_Binlog_cache_disk_use b, v_Binlog_cache_use c
where a.Variable_name='binlog_cache_size' and b.Variable_name='Binlog_cache_disk_use' and c.Variable_name='Binlog_cache_use';
<Metric NAME="BinlogCache" TYPE="TABLE">
<Display>
<Label NLSID="mmd_bc_BinlogCache">BinlogCache</Label>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="binlog_cache_size" TYPE="NUMBER">
<Display>
<Label NLSID="mmd_bc_binlog_cache_size">binlog_cache_size</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Binlog_cache_disk_use" TYPE="NUMBER" TRANSIENT="TRUE">
<Display>
<Label NLSID="mmd_bc_Binlog_cache_disk_use">Binlog_cache_disk_use</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Binlog_cache_use" TYPE="NUMBER" TRANSIENT="TRUE">
<Display>
<Label NLSID="mmd_bc_Binlog_cache_use">Binlog_cache_use</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<ExecutionDescriptor>
<GetTable NAME="MysqlStatusAndVariables"/>
<GetView NAME="v_binlog_cache_size" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">binlog_cache_size</Filter>
</GetView>
<GetView NAME="v_Binlog_cache_disk_use" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">Binlog_cache_disk_use</Filter>
</GetView>
<GetView NAME="v_Binlog_cache_use" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">Binlog_cache_use</Filter>
</GetView>
<JoinTables NAME="v_result" OUTER="TRUE">
<Table NAME="v_binlog_cache_size" />
<Table NAME="v_Binlog_cache_disk_use" />
<Table NAME="v_Binlog_cache_use" />
<Column NAME="binlog_cache_size" COLUMN_NAME="Value" TABLE_NAME="v_binlog_cache_size" />
<Column NAME="Binlog_cache_disk_use" COLUMN_NAME="Value" TABLE_NAME="v_Binlog_cache_disk_use" />
<Column NAME="Binlog_cache_use" COLUMN_NAME="Value" TABLE_NAME="v_Binlog_cache_use" />
</JoinTables>
</ExecutionDescriptor>
</Metric>
If I change the ExecutionDescriptor part to those code as below, is that also has the same result?
<ExecutionDescriptor>
<GetTable NAME="MysqlStatusAndVariables"/>
<GetView NAME="v_binlog_cache_size" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">binlog_cache_size</Filter>
<Column NAME="binlog_cache_size" COLUMN_NAME="Value" TABLE_NAME="v_binlog_cache_size" />
</GetView>
<GetView NAME="v_Binlog_cache_disk_use" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">Binlog_cache_disk_use</Filter>
<Column NAME="Binlog_cache_disk_use" COLUMN_NAME="Value" TABLE_NAME="v_Binlog_cache_disk_use" />
</GetView>
<GetView NAME="v_Binlog_cache_use" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">Binlog_cache_use</Filter>
<Column NAME="Binlog_cache_use" COLUMN_NAME="Value" TABLE_NAME="v_Binlog_cache_use" />
</GetView>
</ExecutionDescriptor>
Thanks,
Satine
Edited by: Satine on Apr 13, 2009 7:43 PM

Here is four metric definitions: "MysqlStatus", "MysqlVariables", "MysqlStatusAndVariables", "BinlogCache".
<Metric NAME="MysqlStatus" TYPE="TABLE" HELP="NO_HELP" USAGE_TYPE="HIDDEN_COLLECT">
<Display>
<Label NLSID="mmd_ms">Mysql Status</Label>
<Description NLSID="mmd_ms_desc">Describes Mysql Status</Description>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="Variable_name" TYPE="STRING" IS_KEY="TRUE">
<Display>
<Label NLSID="mmd_ms_Variable_name">Variable_name</Label>
<Description NLSID="mmd_ms_Variable_name_desc"> The Variable_name. </Description>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Value" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="mmd_ms_Value">Value</Label>
<Description NLSID="mmd_ms_Value_desc"> The Value. </Description>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="emdRoot" SCOPE="SYSTEMGLOBAL">emdRoot</Property>
<Property NAME="scriptsDir" SCOPE="SYSTEMGLOBAL">scriptsDir</Property>
<Property NAME="perlBin" SCOPE="SYSTEMGLOBAL">perlBin</Property>
<Property NAME="host" SCOPE="INSTANCE" OPTIONAL="TRUE">host</Property>
<Property NAME="port" SCOPE="INSTANCE" OPTIONAL="TRUE">port</Property>
<Property NAME="uname" SCOPE="INSTANCE" OPTIONAL="TRUE">uname</Property>
<Property NAME="pass" SCOPE="INSTANCE" OPTIONAL="TRUE">pass</Property>
<Property NAME="mysqlhome" SCOPE="INSTANCE">mysqlhome</Property>
<!--<Property NAME="thescript" SCOPE="INSTANCE">thescript</Property>-->
<Property NAME="showstatus" SCOPE="INSTANCE">showstatus</Property>
<Property NAME="mydelimiter" SCOPE="INSTANCE">mydelimiter</Property>
<Property NAME="command" SCOPE="GLOBAL">"%perlBin%/perl" "%scriptsDir%/emx/%TYPE%/mysqlmon.pl" "%mysqlhome%" "%showstatus%" "%mydelimiter%" "%host%" "%port%" "%uname%" "%pass%"</Property>
<Property NAME="delimiter" SCOPE="GLOBAL">%mydelimiter%</Property>
<Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
<Property NAME="errStartsWith" SCOPE="GLOBAL">em_error=</Property>
<!--<Property NAME="EM_METRIC_TIMEOUT" SCOPE="GLOBAL">60</Property>-->
</QueryDescriptor>
</Metric>
<Metric NAME="MysqlVariables" TYPE="TABLE" HELP="NO_HELP" USAGE_TYPE="HIDDEN_COLLECT">
<Display>
<Label NLSID="mmd_mv">Mysql Variables</Label>
<Description NLSID="mmd_mv_desc">Describes Mysql Variables</Description>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="Variable_name" TYPE="STRING" IS_KEY="TRUE">
<Display>
<Label NLSID="mmd_mv_Variable_name">Variable_name</Label>
<Description NLSID="mmd_mv_Variable_name_desc"> The Variable_name. </Description>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Value" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="mmd_mv_Value">Value</Label>
<Description NLSID="mmd_mv_Value_desc"> The Value. </Description>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="emdRoot" SCOPE="SYSTEMGLOBAL">emdRoot</Property>
<Property NAME="scriptsDir" SCOPE="SYSTEMGLOBAL">scriptsDir</Property>
<Property NAME="perlBin" SCOPE="SYSTEMGLOBAL">perlBin</Property>
<Property NAME="host" SCOPE="INSTANCE" OPTIONAL="TRUE">host</Property>
<Property NAME="port" SCOPE="INSTANCE" OPTIONAL="TRUE">port</Property>
<Property NAME="uname" SCOPE="INSTANCE" OPTIONAL="TRUE">uname</Property>
<Property NAME="pass" SCOPE="INSTANCE" OPTIONAL="TRUE">pass</Property>
<Property NAME="mysqlhome" SCOPE="INSTANCE">mysqlhome</Property>
<!--<Property NAME="thescript" SCOPE="INSTANCE">thescript</Property>-->
<Property NAME="showvariables" SCOPE="INSTANCE">showvariables</Property>
<Property NAME="mydelimiter" SCOPE="INSTANCE">mydelimiter</Property>
<Property NAME="command" SCOPE="GLOBAL">"%perlBin%/perl" "%scriptsDir%/emx/%TYPE%/mysqlmon.pl" "%mysqlhome%" "%showvariables%" "%mydelimiter%" "%host%" "%port%" "%uname%" "%pass%"</Property>
<Property NAME="delimiter" SCOPE="GLOBAL">%mydelimiter%</Property>
<Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
<Property NAME="errStartsWith" SCOPE="GLOBAL">em_error=</Property>
<!--<Property NAME="EM_METRIC_TIMEOUT" SCOPE="GLOBAL">60</Property>-->
</QueryDescriptor>
</Metric>
<!-- Join the infomation of status and variables together -->
<Metric NAME="MysqlStatusAndVariables" TYPE="TABLE" HELP="NO_HELP" USAGE_TYPE="HIDDEN_COLLECT">
<Display>
<Label NLSID="mmd_msv">Mysql Status and Variables</Label>
<Description NLSID="mmd_msv_desc">Describes Mysql Status and Variables</Description>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="Variable_name" TYPE="STRING" IS_KEY="TRUE">
<Display>
<Label NLSID="mmd_msv_Variable_name">Variable_name</Label>
<Description NLSID="mmd_msv_Variable_name_desc"> The Variable_name. </Description>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Value" TYPE="STRING" IS_KEY="FALSE">
<Display>
<Label NLSID="mmd_msv_Value">Value</Label>
<Description NLSID="mmd_msv_Value_desc"> The Value. </Description>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<ExecutionDescriptor>
<GetTable NAME="MysqlStatus" USE_CACHE="TRUE"/>
<GetTable NAME="MysqlVariables" USE_CACHE="TRUE"/>
<Union NAME="result">
<Table NAME="MysqlStatus" />
<Table NAME="MysqlVariables" />
</Union>
</ExecutionDescriptor>
</Metric>
<Metric NAME="BinlogCache" TYPE="TABLE">
<Display>
<Label NLSID="mmd_bc_BinlogCache">BinlogCache</Label>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="binlog_cache_size" TYPE="NUMBER">
<Display>
<Label NLSID="mmd_bc_binlog_cache_size">binlog_cache_size</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Binlog_cache_disk_use" TYPE="NUMBER" TRANSIENT="TRUE">
<Display>
<Label NLSID="mmd_bc_Binlog_cache_disk_use">Binlog_cache_disk_use</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Binlog_cache_use" TYPE="NUMBER" TRANSIENT="TRUE">
<Display>
<Label NLSID="mmd_bc_Binlog_cache_use">Binlog_cache_use</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Binlog_cache_disk_use_d" TYPE="NUMBER"
COMPUTE_EXPR="((Binlog_cache_disk_use >= _Binlog_cache_disk_use) ? 0 : 4294967295) + (Binlog_cache_disk_use - _Binlog_cache_disk_use)">
<Display>
<Label NLSID="mmd_bc_Binlog_cache_disk_use_d">Binlog_cache_disk_use_d</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Binlog_cache_use_d" TYPE="NUMBER" TRANSIENT="TRUE"
COMPUTE_EXPR="((Binlog_cache_use >= _Binlog_cache_use) ? 0 : 4294967295) + (Binlog_cache_use - _Binlog_cache_use)">
<Display>
<Label NLSID="mmd_bc_Binlog_cache_use_d">Binlog_cache_use_d</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Binlog_cache_hit_ratio_d" TYPE="NUMBER"
COMPUTE_EXPR="(Binlog_cache_use_d != 0) ? ( (1 - Binlog_cache_disk_use_d / Binlog_cache_use_d) * 100.0 ) : 100">
<Display>
<Label NLSID="mmd_bc_Binlog_cache_hit_radio_d">Binlog_cache_hit_ratio_d(%)</Label>
</Display>
</ColumnDescriptor>
</TableDescriptor>
<ExecutionDescriptor>
<GetTable NAME="MysqlStatusAndVariables"/>
<GetView NAME="v_binlog_cache_size" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">binlog_cache_size</Filter>
</GetView>
<GetView NAME="v_Binlog_cache_disk_use" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">Binlog_cache_disk_use</Filter>
</GetView>
<GetView NAME="v_Binlog_cache_use" FROM_TABLE="MysqlStatusAndVariables">
<Filter COLUMN_NAME="Variable_name" OPERATOR="EQ">Binlog_cache_use</Filter>
</GetView>
<JoinTables NAME="v_result" OUTER="TRUE">
<Table NAME="v_binlog_cache_size" />
<Table NAME="v_Binlog_cache_disk_use" />
<Table NAME="v_Binlog_cache_use" />
<Column NAME="binlog_cache_size" COLUMN_NAME="Value" TABLE_NAME="v_binlog_cache_size" />
<Column NAME="Binlog_cache_disk_use" COLUMN_NAME="Value" TABLE_NAME="v_Binlog_cache_disk_use" />
<Column NAME="Binlog_cache_use" COLUMN_NAME="Value" TABLE_NAME="v_Binlog_cache_use" />
</JoinTables>
</ExecutionDescriptor>
</Metric>
Edited by: Satine on Apr 22, 2009 12:16 AM

Similar Messages

  • How to find what sql statement is currently running by scheduler job?

    Hi
    I scheduled a stored procedure to run every 5 minutes using dbms_scheduler.
    The stored procedure internally call serveral other stored procedures.
    The scheduled job is in running state and right now I want to find out what is the sql statement the job executing.
    Is there any sql query to find out what is sql query the schedular job is running?? Please help me.
    Thanks in Advance.

    The previous sql id is null in this case.
    I already quoted as I am running a pl/sql block in my scheduler job.
    begin
    usp_test('praram');
    end;
    I am using the pl/sql block as above in my scheduler job. The USP_TEST inturn calls some other stored procedures and each stored procedure has several inserts and update statements.
    The scheduler job is still running. I know the sid of the running scheduler job.
    I want to know the job is at which stored procedure and at which insert/update statement.
    Please let me know is there any query to fulfil my requirement?
    I greatly appreciate your help
    Thanks

  • How to find SQL Statements for BW queries ?

    Experts,
    Is there a way, we can see what SQL statement BW queries creates ?
    please Help.

    Hi,
    use sql trace: transaction ST05.
    ask your database admin. He can control the database session.
    => for oracle: you can see the session also in the sap gui.
    Sven

  • How to get SQL statement from (Collection) query.execute();

    We have a JDO Persistence class ClassName that execute query using following code. After this statement get executed, record does not get updated in the DB. Is there a way to check what SQL statement got submitted in the (Collection) query.execute(); ??? <br><br>
    Extent extent = pm.getExtent(ClassName.class, false); <br>
    Query query = null; <br>
    try { <br>
    query = pm.newQuery(extent, filter); <br>
    Collection results = (Collection) query.execute();<br>
    Iterator i = results.iterator();<br>
    if (i.hasNext()) {<br>
    ...<br>
    }<br>

    You can always find out the names of tables that are views, using java.sql.DatabaseMetaData and its getTables() method.
    This tends to be a nice source of examples:
    javaalmanac.com
    However, if you're asking for the underlying SQL used to CREATE VIEW, I don't see anything in the API that will give you that. After all, JDBC shouldn't have to know if it's dealing with an ordinary table or a view. I think you'd have to ask your DBA for the underlying SQL.
    Once you have it, what do you plan to do with it?
    %

  • Bulk Loading using remote sql statement execution

    Well, i have a different scenario. I want to bulk load the tables like we do in MySQL with LOAD LOCAL DATA sql command.
    I have a file populated with data, what sql statement would bulk load the data into specified table using that file?
    Adnan Memon

    In Oracle, you would either use the SQL*Loader utility to load data from a flat file or you would create an external table (9i and later) that loads the flat file.
    A quick example of the external table approach
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • What's wrong with this SQL Statement?

    I hope somebody can help explain to me what is wrong wiht the
    following SQL statement in my Recordest. It does not return an
    error, but it will only filter records from the first variable
    listed, 'varFirstName%'. If I try to use any other variables on my
    search form,for example LastName, it returns all records. Why is it
    doing this?
    Here is the SQL statement:
    SELECT *
    FROM [Sysco Food Show Contacts]
    WHERE FirstName LIKE 'varFirstName%' AND LastName LIKE
    'varLastName%' AND OrganizationName LIKE 'varOrganizationName%' AND
    Address LIKE 'varAddress%' AND City LIKE 'varCity%' AND State LIKE
    'varState' AND PostalCode LIKE 'varPostalCode%'
    The variables are defined as below:
    Name Default Value Run-Time Value
    varFirstName % Request.Form("FirstName")
    varLastName % Request.Form("LastName")
    ...and such with all variables defined the same way.
    Any help would be much appreciated. I am pulling my hair out
    trying to make this Search Form work.
    Thanks, mparsons2000

    PLEASE IGONRE THIS QUESTION!
    There was nothing wrong with the statement. I had made
    another STUDIP mistake!

  • What does the usage of CURSOR word mean in an SQL statement?

    Hey folks,
    Please check out the following query and do please explain me what does the usage of CURSOR keyword in an SQL statement mean.
    select deptno,cursor(select ename from emp a where a.deptno=b.deptno) from dept b;
    well, the output was like this,
    DEPTNO CURSOR(SELECTENAMEFR
    10 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    ENAME
    CLARK
    KING
    20 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    ENAME
    SMITH
    JONES
    SCOTT
    ADAMS
    FORD
    30 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    ENAME
    ALLEN
    WARD
    MARTIN
    BLAKE
    TURNER
    JAMES
    6 rows selected.
    40 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    no rows selected
    Your favour'll be deeply appreciated.
    Cheers,
    PCZ

    This returns a non-square result set. Each row of the result is a deptno and then a result set of the enames in that deptno.
    This can be useful when you need to send a lot of data to a client application in a single query that would otherwise contain a lot of redundancy. It tends to be a relatively unusual construct (I've only found one situation where it was appropriate in my career) and requires some relatively sophisticated understanding on both the database and client sides.
    Justin

  • Whats wrong with this sql statement ??

    Hello all, I am trying to run the below query out of persheet(tanel poder) performance excel chart...but i get below error...db is on 9.2
    what is wrong with this sql statement ?
    http://blog.tanelpoder.com/2008/12/28/performance-visualization-made-easy-perfsheet-20-beta/
    select * from (
    with fsq as (
      select /*+ materialize */
       i.dbid
        , i.instance_name
        , i.instance_number
    --    , trunc(s.snap_time, 'DD')     DAY
    --    , to_number(to_char(s.snap_time, 'HH24'))  HOUR
    --   -- , to_char(s.snap_time, 'MI')    MINUTE
    --    , 0           MINUTE
        , trunc(
          lag(s.snap_time, 1)
          over(
           partition by
          v.dbid
           , i.instance_name
           , v.instance_number
           , v.event
         order by
          s.snap_time
          , 'HH24'
         )           SNAP_TIME
        , v.event_type        EVENT_TYPE
        , v.event          EVENT_NAME
        , nvl(
        decode(
         greatest(
          time_waited_micro,
          nvl(
           lag(time_waited_micro,1,0)
           over(
            partition by
             v.dbid
              , i.instance_name
              , v.instance_number
              , v.event
            order by v.snap_id
           , time_waited_micro
         time_waited_micro,
         time_waited_micro - lag(time_waited_micro,1,0)
         over (
          partition by
           v.dbid
            , i.instance_name
            , v.instance_number
            , v.event
          order by v.snap_id
         time_waited_micro
           , time_waited_micro
         ) / 1000000         SECONDS_SPENT
        , total_waits         WAIT_COUNT
      from
       (select distinct dbid, instance_name, instance_number from stats$database_instance) i
        , stats$snapshot s
        , ( select
         snap_id, dbid, instance_number, 'WAIT' event_type, event, time_waited_micro, total_waits
        from
         stats$system_event
        where
         event not in (select event from stats$idle_event)
        union all
        select
         snap_id, dbid, instance_number,
         case
          when name in ('CPU used by this session', 'parse time cpu', 'recursive cpu usage') then 'CPU'
          when name like 'OS % time' then 'OS'
          else 'STAT'
         end,
         name , value, 1
        from
         stats$sysstat
    --    where      name in ('CPU used by this session', 'parse time cpu', 'recursive cpu usage')
    --    or  name like('OS % time')
    --    or 1 = 2 -- this will be a bind variable controlling whether all stats need to be returned
       ) v
      where
       i.dbid = s.dbid
      and i.dbid = v.dbid
      and s.dbid = v.dbid
      and s.snap_id = v.snap_id
      and s.snap_time between '%FROM_DATE%' and '%TO_DATE%'
      and i.instance_name = '%INSTANCE%'
    select * from (
      select
       instance_name
        , instance_number
        , snap_time
        , trunc(snap_time, 'DD')  DAY
        , to_char(snap_time, 'HH24') HOUR
        , to_char(snap_time, 'MI') MINUTE      
        , event_type  
        , event_name  
        , seconds_spent
        , wait_count  
        , ratio_to_report(seconds_spent) over (
    --      partition by (to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09'))
          partition by (snap_time)
          ) ratio
      from fsq
      where
       snap_time is not null -- lag(s.snap_time, 1) function above will leave time NULL for first snapshot
      -- to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09')
      -- > ( select min(to_char(day, 'YYYYMMDD')||to_char(hour,'09')||to_char(minute, '09')) from fsq)
    where ratio > 0
    order by
        instance_name
      , instance_number
      , day
      , hour
      , minute
      , event_type
      , seconds_spent desc
      , wait_count desc
    Error at line 6
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00972: identifier is too long

    Hi Alex,
    Subquery factoring a.k.a. the with-clause should be possible on 9.2:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_103a.htm#2075888
    (used it myself as well on 9.2)
    @OP
    I recall having problems myself using PL/SQL Developer and trying to get the with clause to work on 9.2 some years ago.
    A workaround might be to create a view based on the query.
    Also, your error message is "ORA-00972: identifier is too long"...
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/e900.htm#sthref419
    Can't test things currently, no 9.2 available at the moment, but perhaps tomorrow I'll have a chance.

  • What this SQL statement is doing?

    Hi ABAPers,
    Can somebody help me in understanding what the below SQL statement is doing..
      SELECT * FROM /BIC/ADSO00 AS tb1
          INNER JOIN /BIC/PMASTER as tbl2
          ON tbl1~field1 = tbl2~field1
          AND tbl12~field2 = tbl2~field2
          INTO CORRESPONDING FIELDS OF TABLE gt_itab
          FOR ALL ENTRIES IN SOURCE_PACKAGE
          WHERE tbl1~field3 = SOURCE_PACKAGE-field3
          AND tbl1~field4 BETWEEN lv_minper AND lv_maxper
          AND tbl1~field5 = SOURCE_PACKAGE-field5
          AND tbl1~field6 = '0100'
          AND tbl2~OBJVERS = 'A'.
    thanks in advance !!
    Bharath S

    Hi Bharath,
    tb1 is your /BIC/ADSO00 table
    tbl2 is your  /BIC/PMASTER second table.
    It is selecting all contents from /BIC/ADSO00 table available and is selecting respective contents from /BIC/PMASTER second table using field 1 and field2 as key(unique in two tables) and moving into an internal table(structures used in program for holding values similar to DB and can hold values till program execution ends) and selection is valid only for entries in source_package another internal table.
    Conditions for the selections are
    tbl1~field3 = SOURCE_PACKAGE-field3
          AND tbl1~field4 BETWEEN lv_minper AND lv_maxper
          AND tbl1~field5 = SOURCE_PACKAGE-field5
          AND tbl1~field6 = '0100'
          AND tbl2~OBJVERS = 'A'.
    Hope it will be helpful.
    Regards,
    Kannan

  • What does || do in a SQL statement after a where with a like?

    We have a packaged application that outputs a SQL statement with the || operator in a where clause along with a LIKE. I have never seen it before and expected it to be a syntax error. I do not see any examples of this syntax in sources such as Morgan's Library.
    For example purposes, observe in the 10g Express Edition currently up for download. Observe that the SQL statement "compiles" when the || operator is used before a like statement, but does not "compile" when used on its own - it gives the error I expected that || is not a relational operator. What does this syntax do?
    For orignal context, the relevant portion of the where clause is:
    T1.QUOTE_NUM || :3 || T1.REV_NUM LIKE :4but the below does so just off of what is available in any instance - much easier to reproduce.
      1  select * from v$sqltext
      2* where (hash_value || 3657695316 || sql_text like 'L%')
    SQL> /
    no rows selected
    SQL> edit
    Wrote file afiedt.buf
      1  select * from v$sqltext
      2* where (hash_value || 3657695316)
    SQL> /
    where (hash_value || 3657695316)
    ERROR at line 2:
    ORA-00920: invalid relational operator
    [pre]
    Thanks for your attention and advice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I may have answered my own question. It appears that you can use the || to concatenate strings for comparison with a relational operator as in the example below. I've just never seen this before. Can anyone confirm this is what it really does?
    SQL> select count(*) from dual;
      COUNT(*)
             1
    SQL> select count(*) from dual
      2  where '123' = '123';
      COUNT(*)
             1
    SQL> edit
    Wrote file afiedt.buf
      1  select count(*) from dual
      2* where '123' = '124'
    SQL> /
      COUNT(*)
             0
    SQL> edit
    Wrote file afiedt.buf
      1  select count(*) from dual
      2* where '1' || '23' = '123'
    SQL> /
      COUNT(*)
             1
    SQL> edit
    Wrote file afiedt.buf
      1  select count(*) from dual
      2* where '1' || '23' = '124'
    SQL> /
      COUNT(*)
             0

  • What is wrong with my SQL Statement

    I am getting errors when trying to apply an SQL statement to a report, and I can't figure it out. The error reads: "Syntax error (missing operator) in the query expression 'Title = "Sales Representative"'. Could someone please tell
    me where it is I have gone wrong? The statement is suppose to show records of employees that have Sales Representative as their Title. This is what I came up with:
    SELECT * FROM Employees WHERE Title = “Sales Representative” 

    Try putting brackets around table and field names.  
    I found wrong kind of double quote also ---
    SELECT [Employees].* FROM [Employees] WHERE
    [Employees].[Title] = "Sales Representative"; 
    Build a little, test a little

  • What can be the cause of Web ADI error : Cannot execute SQL statement?

    I created a custom integrator in r12.2.3 and while loading I encountered an error, Cannot execute SQL statement.
    I checked my setup in Interface attribute , the RUN_ID column has a default type SQL QUERY with a default value SELECT  XXCONV_EAM_ASSET_NUM_S.NEXTVAL FROM DUAL.
    If I have a right setup here, what can be the cause of this error?

    Hi,
    The possibilities can be of various reasons, with the sql statements,
    xml descriptors, data sources, improper drivers anything. To crack down
    the solution, kindly let me know the error messages and what exactly are
    you trying to accomplish.
    Thanks & Regards
    Raj
    manimaran t wrote:
    what may be the cause of this error java.sql.SQLException: invalid sql
    type passed to callable statement in iplanet ussing JNDI
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • VPD - what happens if predicate already coded on sql statement?

    Does anyone know, when using VPD, what happens if a where clause already exists on an sql statement that a policy predicate would duplicate?
    ie the examples are all simple, like adding a "where customer = xx" to a statement like "select * from customer_tab"
    what if the user-entered statement is instead "select * from customer_tab where customer = yy", and then the VPD policy appends "where customer = xx" to that? That would result in an error, unless VPD is intelligent enough to handle this condition.
    Can anyone tell me what VPD will do in this scenario?

    Yes, the VPD is sufficient intelligent to this.
    In this in case that the message is returned below:
    ORA-28115: policy with check option violation
    Cause: Policy predicate was evaluated to FALSE with the updated values.
    Action:     none

  • What sql will be for oracle for FOR XML AUTO, XMLSCHEMA, ELEMENTS XSINIL

    Hi all,
    I have developed an application which supports both database sql server and oracle. I am using sql
    select * from test FOR XML AUTO, XMLSCHEMA, ELEMENTS XSINIL, ROOT('test')
    to fetch records in xml format from SQL Server.
    I want to know what sql will be for oracle to get same result set in xml format.
    Thanks in advance.
    Edisphere software
    Vijay singh

    here is one way...
    declare
      qryctx         DBMS_XMLquery.ctxType;
      v_message CLOB;
      v_sql          VARCHAR2(400);
    begin  v_sql  := 'SELECT * FROM DUAL';
      qryctx := DBMS_XMLquery.newContext(v_sql);
      v_message :=  DBMS_XMLquery.getXML(qryCtx);
      DBMS_XMLquery.closeContext(qryCtx);
    dbms_output.put_line(v_message);
    end;
    Sample  output is:
    ===========
    <?xml version = '1.0'?>
    <ROWSET>
       <ROW num="1">
          <DUMMY>X</DUMMY>
       </ROW>
    </ROWSET>Validate it against a schema
    xmldoc XMLTYPE;
    v_xml_schema varchar2(4000) :='your schema definition';
      xmldoc := XMLTYPE(v_xml).createSchemaBasedXML(v_xml_schema);
      xmldoc.schemaValidate();Edited by: user130038 on Sep 20, 2011 6:00 AM

  • What means ".... FROM DUAL" in SQL statements?

    Occasionally I find in different SQL statement the appedix "....from dual" e.g.
    SELECT blahblah FROM DUAL;
    It seems to me that this is a special built-in table.
    What does that mean exactely?
    Peter

    I guess 'FROM' clause is mandatory in Oracle. Hence,
    there must always be a table from which we are
    selecting values. So, for selecting some arbitary
    values which are not coming from any DB Table, we use
    this dummy table 'Dual'.
    Like
    select substr('sometext',5) from dual;
    select sysdate from dual ;
    etc.
    Hope this clarifies.This explanation might be misleading.
    The FROM clause is of cause mandatory for a SELECT statement (I think any SQL DB system, not only Oracle). So whenever you need to write a SELECT you might need a dual table.
    If you are in PL/SQL you can use most functions without doing a SELECT. Like
    a:= substr('sometext',5);
    myDate := sysdate;For some things we need to do a select. If we don't have a matching table, then the dual table is handy to return only one row.
    example
    SELECT mySequence.nextval FROM DUAL;When we are using some tools, like SQL*Plus or T.O.A.D. our typical path to get information returned to the gui is a select. This would be a case were your examples could be used. But you could also do it like this: execute dbms_output.put_line(to_char(sysdate)); After switching the serveroutput on.

Maybe you are looking for

  • Can't play manually added videos since upgrading to IOS 8

    Since upgrading to IOS 8, my iPhone 5 won't play any videos that I copy to the device manually through iTunes. These are videos that I've played on the iPhone before, so I know they are compatible and of the correct format. Basically what is happenin

  • The graphic HTML signature panel does not appear in my Mac mail

    The graphic HTML signature panel does not appear in my Mac mail. I have inserted the signature after reading on the forum. But the images do not download - the rest of the text in the signature is in place - just the logo and the baseline which is a

  • Why is the exported file size so small?

    Hello! I just spent the last few days watching about three hours of Adobe Premiere Pro CS3 tutorials and almost all five hours of the Adobe Encore CS3 tutorials on Lynda.com with the awesome 30-day trial that I received for purchasing these two progr

  • Chunk of Error files

    Hi All, I have so many error files generated under "$OracleHomes/gc_inst/em/EMGC_OMS1/sysman/recv/errors " Can anyone tell me what are these errors ? Can I safely delete these files? Thanks, Imran

  • Pdf highlighting question

    When a highlighted pdf, highlighted in Acrobat Professional 8.0, is imported into InDesign CS3, the highlighting no longer shows. Is there some way to keep this highlighting? I am on a Mac with OS X Leopard. Thanks.