Odd Behaviour: Query and Table

I have odd occurrences within my code and need an explanation
to one and help with the other.
First of all, I have a query within which I am using the
group attribute, and then I am using a counter to control the
behaviour of the output within a table. The problem is that when I
use currentrow attribute with my query which returns seven fields
with on of them being used for the grouping, the currentrow counter
returns 1 through six for the non grouped fields, yet when I use a
counter to count the rows and use a MODULUS operator to create a
conditional statement, I get the right result with a MOD 7 rather
than a MOD 6. Why is coldfusion counting seven fields (when I use
the MOD operator) though currentrow counts 6? (Code is attached and
numbered 1)
Secondly, I am outputing the results of my query using two
different tables as the information for the header is not easily
included within my query. So I have two queries, one displaying the
header and the other the query results.
Now because they are related I wanted to align the two table
one on top of the other (this was successful) my problem is that
thought I define the same table with and subsequently the same with
for respective fields in both tables (table width is 980 pixels
with the first column being assigned 182 pixels and the rest of the
columns being assigned 136 pixels each. However the output shows
that the tables and the columns are not perfectly aligned and they
do not have the same size (why is this when I have hard coded the
width of the columns?). How do I get the two tables to align
perfectly? (code for tables is numbers 2). TIA

Go to SQ03. Check the Authorizations for both the user groups. Compare and based on the differences find out what is causing the error.
SQ03 --> Enter user group ..> click Assign infoset to user group...
Assign tht infoset to user BB.

Similar Messages

  • With query and table access

    I am using WITH query to reduce the scanning the teacher table thrice for the below query
    xe > with q as
      2  (select  teacher_id,subject_1,subject_2,subject_3 from teacher
      3  )
      4  select teacher_id,subject_1 from q
      5  union all
      6  select teacher_id,subject_2 from q
      7  union all
      8  select teacher_id,subject_3 from q
      9  /
    However, the execution plan shows that the table was scanned for twice.
    Execution Plan
    Plan hash value: 91048842
    | Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |         |     6 |   180 |     6  (67)| 00:00:01 |
    |   1 |  UNION-ALL         |         |       |       |            |          |
    |  2 |   TABLE ACCESS FULL| TEACHER |     2 |    60 |     2   (0)| 00:00:01 |
    |   3 |   TABLE ACCESS FULL| TEACHER |     2 |    60 |     2   (0)| 00:00:01 |
    |   4 |   TABLE ACCESS FULL| TEACHER |     2 |    60 |     2   (0)| 00:00:01 |
    Note
       - dynamic sampling used for this statement (level=2)
    Statistics
             10  recursive calls
              0  db block gets
             22  consistent gets
              0  physical reads
              0  redo size
            594  bytes sent via SQL*Net to client
            420  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              6  rows processed
    Why the table was scanned thrice?
    Thanks for your time..

    Hi,
    A SQL query describes the result set you want; it does not show how the system gets those results.  Don't expect how the query code looks to have much to do with what the system will do.  For example, the fact that the code only says "teacher" 1 time doesn't mean that the teacher table will only be scanned 1 time.
    Try
    SELECT    teacher_id, subject
    FROM      teacher
    UNPIVOT   ( subject
              FOR  subject_num IN ( subject_1  AS 1
                                  , subject_2  AS 2
                                  , subject_3  AS 3

  • When we go for view ,fm,infosetquery,and tables

    Hi Masters,
    1)when we go for view ,fm,infosetquery,and tables ?
    & how to create view ,fm,infosetquery,and tables ?
    2)what is user of numeric pointer?
    3)what is different between view ,fm,infosetquery,and tables ?
    4) what is user of view ,fm,infosetquery,and tables ?
    please help on this issue by give good understading answer

    Hi Kumar,
    1. Maintaining Generic DataSources.
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/frameset.htm
    Create View:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
    Create FM:
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/frameset.htm
    Create Table:
    http://help.sap.com/saphelp_nw04/helpdata/en/87/773a55f35a65409009e87261c84eb2/frameset.htm
    Create Infoset query:
    How to create infoset query
    what is an infoset and infoset query?
    Create Generic Delta:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    2. Numeric pointer:
    Generic Delta with Numeric pointer.
    Generic Delta Extraction
    Delta specific fields
    You can have the differences and the uses of View, FM, Infoset query and table from above links itself.
    Hope these helps u...
    Regards,
    KK.

  • How to work even and odd number query

    Plz explain how below worked even and odd query
    2 ) why used subquery after from and which time we can use(what time of out put)
    even
    select * FROM (SELECT ROW_NUMBER() OVER(ORDER BY stud_id) as row ,grno,stud_id from stud_Enrollment) d
     WHERE d.row %2=0   
    odd
    select * FROM (SELECT ROW_NUMBER() OVER(ORDER BY stud_id) as row ,grno,stud_id from stud_Enrollment) d
     WHERE d.row %2=1

    Row_Number function returns the sequential number of a row
    (By using partition of a result set, starting at 1 for the first row in each partition)
    >> why used subquery after from and which time we can use(what time of out put)
    When we need sequntial numbers, we can use row_number function. Put it into derived table and use this derived table after FROM clause (Same way it is used in your query)
    CREATE TABLE stud_Enrollment (
    grno int,
    stud_id int,
    stud_name varchar(20)
    INSERT INTO stud_Enrollment
    VALUES (101, 511, 'Dheeraj'), (112, 521, 'Vaibhav'), (132, 522, 'Lalit'), (124, 564, 'Amogh'), (143, 598, 'Sushrut')
    SELECT * FROM stud_Enrollment
    -- Result of your table
    --grno stud_id stud_name
    --101 511 Dheeraj
    --112 521 Vaibhav
    --132 522 Lalit
    --124 564 Amogh
    --143 598 Sushrut
    -- Now we need to find out the rows which are at even position, ie row should be at position of 0,2,4,6,8 etc..
    -- But we don't have sequential number here in your table result
    -- So we can create one new column by using row_number function
    SELECT
    ROW_NUMBER() OVER (ORDER BY stud_id) AS row, --> additiona "row" column
    grno,
    stud_id,
    stud_name
    FROM stud_Enrollment
    -- We got "row" column in below output
    --row grno stud_id stud_name
    --1 101 511 Dheeraj
    --2 112 521 Vaibhav
    --3 132 522 Lalit
    --4 124 564 Amogh
    --5 143 598 Sushrut
    -- Now above table is used after FROM clause. It uses row column in WHERE part
    SELECT
    FROM (SELECT
    ROW_NUMBER() OVER (ORDER BY stud_id) AS row,
    grno,
    stud_id,
    stud_name
    FROM stud_Enrollment) d
    WHERE d.row % 2 = 0
    --row grno stud_id stud_name
    --2 112 521 Vaibhav
    --4 124 564 Amogh
    -Vaibhav Chaudhari

  • ADF Table refresh odd behaviour: is it a bug?

    Hi,
    I am using JDev 11.1.2.3.0.
    I found a strange behaviour of ADF table, that looks like a bug.
    I am using the following scenario:
    1). I have a page with a table on it. The table displays the VO content and all it's columns are filterable.
    2). There is another more complex filter with one parameter. The filter is always applied in addition to all existing filters and is implemented in VO implementation class by overriding the  buildWhereClause() method. The parameter value is stored in the VO as a property, and the property setter is exposed via client interface.
    3). The filter parameter value is specified using Select One Choice component, the value is stored in the pageFlowScope variable (AutoSubmit=true).
    4). The filter parameter setter is binded in the PageDef file as a method action and obtains the value from the corresponding pageFlowScope variable. When user press a button, the filter should be applied. The button has PartialSubmit=true, the table has a reference to the button in the PartialTriggers.
    Here is some code:
    // MyViewObjectImpl code fragment
    private String filter;
    public String getFilter() {
      return filter;
    public void setFilter(String filter) {
      boolean valueChanged = true;
      if (this.filter != null && filter != null) {
        valueChanged = !this.filter.equals(filter);
      this.filter = filter;
      if (valueChanged) {
        clearCache();
    // Backing bean code fragment
    private RichTable table;
    public void setTable(RichTable table) {
      this.table = table;
    public RichTable getTable() {
      return table;
    public String onApplyFilter() {
      BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
      OperationBinding op = bc.getOperationBinding("setFilter");
      op.execute();
      FilterableQueryDescriptor fm = (FilterableQueryDescriptor)table.getFilterModel();
      table.queueEvent(new QueryEvent(table, fm));
      return null;
    All works fine except for one thing: the 26-th row of the table always remains from the previous filter value. More precisely, this number equals to iterator RangeSize+1.
    Is this my fault or a bug?
    Thanks.

    Sorry, I forgot about the detailed instructions.
    1). Setup database connection to match the real DB server address, username and password.
    2). Run the ViewController project.
    3). Choose character 'a' in the filter and push "Apply". This will give the countries, ending with the letter a.
    4). Change filter to 'e' and push "Apply". This should give the countries, ending with the letter e, but in fact the second row is 'Argentina' (the first row from the previous query). Pressing the button again produces correct results.
    Thanks.

  • Output query and alert if there is a duplicate between 2 tables

    I have 2 tables MembTableA and MembTableB. If a MemberNumber exists on both tables I want to somehow put an alert in my coldfusion output (I have an example "CFIF" in my code below) - and only show the 1 result from MemberTableA. Below is my query and output - can someone assist?
    Query in CFC
    SELECT     dbo.MembTableA.MemberNumber, dbo.MembTableA.StatusCode, dbo.membTableB.Status
    FROM         dbo.MembTableA LEFT OUTER JOIN
                          dbo.membTableB ON dbo.MembTableA.MemberNumber = dbo.membTableB.MemberNumber
                                    Where dbo.MembTableA.status IS NULL
                                    AND (dbo.MembTableA.StatusCode) = <cfqueryparam value="555" cfsqltype="cf_sql_varchar">
                                    or dbo.membTableB.Status = <cfqueryparam value="999" cfsqltype="cf_sql_varchar">
    Output code on page
    <cfinvoke component=.....
              method="MemberNumberLst"
              returnvariable="MemberNumberLst">
    <table>
                    <tr>
                      <th>Member Number</th>
                      <th>Status Code</th>
                    </tr>
    <cfoutput query="MemberNumberLst">
                    <tr>
                      <cfif MemberNumberLst.MemberNumber is on both tables ..... >
                      <td>#MemberNumber# **on both tables**</td>
                      <cfelse>
                      <td>#MemberNumber#</td>
                      </cfif>
                      <td>#StatusCode#</td>
                    </tr>    
    </cfoutput>
    </table>

    earwig75,
    Since you are doing a left outer join, if there is a matching MemberNumber in MembTableB, you just need to check if the dbo.membTableB.MemberNumber column is not blank.  You'll need to add the dbo.MembTableB.MemberNumber column to your SELECT statement.  However, because ColdFusion's query results don't carry fully qualified column names (i.e. dbo.membTableA.MemberNumber and dbo.membTableB.MemberNumber will both be listed as MemberNumber), you will have to use an alias on that column.  Also, if you use aliases on table names, it will simplify the rest of your query.  Here's a cleaner version:
    SELECT     tblA.MemberNumber, tblA.StatusCode, tblB.Status, tblB.MemberNumber as MemberNumberB
    FROM         dbo.MembTableA  AS tblA LEFT OUTER JOIN
                          dbo.membTableB AS tblB ON tblA.MemberNumber = tblB.MemberNumber
                                    Where tblA.status IS NULL
                                    AND (tblA.StatusCode) = <cfqueryparam value="555" cfsqltype="cf_sql_varchar">
                                    or tblB.Status = <cfqueryparam value="999" cfsqltype="cf_sql_varchar">
    Will MemberNumber always appear in MembTableA and only sometimes in MembTableB?  If so, then the modified query should work.  If the number might appear in MembTableA sometimes, or might appear in MembTableB sometimes, then the query probably needs to be redesigned.  If MemberNumber will always appear in MembTableA, your <cfif> could then look like this:
    <cfif MemberNumberLst.MemberNumberB <> ''>
    Also, you might want to check the location of the parenthesis in your WHERE clause.  AND operators take precedence over OR operators, so this query is going to either find records where both the tblA.status is null AND tblA.StatusCode equals '555', or records where tblB.Status equals '999'.  Is this precisely what you want?
    HTH,
    -Carl V.

  • Query Dictionary tables and V$ views in EM

    Hello;
    I want to query dba_ tables and v$ views from Enterprise manager (10g).
    I hv tried that in the Tables -> SYS schema ; But these tables are not shown there. Im unable to query from the EM.
    Able to query from the sql plus , Where i have logged as SYS
    select status from v$instance;
    From where can i access these tables; (in EM)
    v$instance
    v$database
    dba_tablespaces
    Edited by: Zerandib on Dec 8, 2009 8:39 AM

    Zerandib wrote:
    From where can i access these tables; (in EM)
    v$instance
    v$database
    dba_tablespaces
    Those are not tables, they are views. Try looking under Adminstration|Schema|Views with schema as SYS. Keep in mind many of the V$ names, such as V$INSTANCE, are public synonyms for V_$ views. For example V$INSTANCE is a public synonym for V_$INSTANCE.

  • How to query a table and result together with autonumber

    Hi all
    How to query a table and the result return autonumber for each row together with the table values.
    I have tried rowid but it provide me with characters.
    Tj

    What is your exact requirement?
    If you want the number of rows selected, you can use rownum.
    select rownum, a.* from <table> a;
    Cheers
    Deepak

  • Query a table and exit when first record found

    I want to query a table and just want to know if any rows matching my query criteria exist in the table. I just want to find one row, irrespective of order and stop the query right there. How do I do that?

    The most efficient way would be either to use rownum = 1 as part of the condition in your second query, but, as written, both will return multiple rows. Your first will need to have an additional predicate and rownum = 1 in addition to the exists.
    Assuming that the predicate can use an index, then the most efficient approach would be either:
    SELECT 1 FROM table
    WHERE <conditions> and
          rownum = 1or possibly:
    SELECT 1 FROM dual
    WHERE EXISTS (SELECT 1 FROM table
                  WHERE <conditions>)Both will do a range scan on the applicable index, stopping when the find the first matching entry. To my mind, the first is clearer in intent.
    To illustrate the error in your first query, consider:
    SQL> SELECT * FROM t;
            ID DESCR
             1 One
             2 Two
             3 Three
             4 Four
             5 Five
             1 One
             2 Two
             3 Three
             4 Four
             5 Five
    SQL> SELECT * FROM t
      2  WHERE id = 1 and
      3        rownum = 1;
            ID DESCR
             1 One
    SQL> SELECT * FROM t
      2  WHERE EXISTS (SELECT 1 FROM t
      3                WHERE id = 1);
            ID DESCR
             1 One
             2 Two
             3 Three
             4 Four
             5 Five
             1 One
             2 Two
             3 Three
             4 Four
             5 FiveJohn
    Edited by: John Spencer on Oct 2, 2009 12:06 PM
    Added queries from t

  • Errors with querying a query table using non-QoQ query and QoQ query

    HELP ! ! !  Going into testing soon. I need this to work to get correct report results ! ! ! !
    My issue seems similar to the one just answered about Query of Queries RunTime Error
    and the reply from lawhite01 caught my eye.
    This is a 2 parter. The second part is the QoQ part, but the 1st part has a line in the query that is similar to the QoQ one and it uses the same data. Part 1 also throws an error.
    PART # 1.
    I'm trying to use a query table created through QueryNew and then query it.
    I need multiple columns in the query table I create:
    <cfscript>
            tot_AllCurrentDraftListing = QueryNew("AnnounceNum, JP_PDLoc, JP_JS_Title, JP_JS, JP_KW_1, JP_JobTitle, JP_Open, JP_Close, JP_CloseType, JP_CloseName, JP_PosNeed, JP_DirectHire, JP_Desc, JP_Draft, JP_Archived, JP_State, JP_AreaName, JP_AreaID, JP_AreaAlias, JP_Fac_SU, JP_Fac_Facility, JP_FAC_ID, JP_Grade1, JP_sal_low1, JP_sal_high1, JP_Grade2, JP_sal_low2, JP_sal_high2, JP_Grade3, JP_sal_low3, JP_sal_high3, JP_Grade4, JP_sal_low4, JP_sal_high4, JP_Grade5, JP_sal_low5, JP_sal_high5, JP_Posted, JP_TypeHire, JP_HRemail");
        </cfscript>
    Then I populate all the cells of the query table.
    Then I set up to use the created query table.
    I do this first:
        <cfquery name="qAltPostID" datasource="#at_datasource#">
             SELECT AltPoster, fk_Job_AnnounceNum
             from JOB_JPContacts
             Where AltJPContactType = 'AltPosterID'
             and AltPoster = '#session.IHSUID#'
             </cfquery>
    Then, in my first query using the created query, I expect to need to choose from multiple values, so I'm using this line in the query (this is NOT a QoQ query):
                and AnnounceNum IN (<cfqueryparam cfsqltype="CF_SQL_varchar" value="#ValueList(qAltPostID.fk_Job_AnnounceNum)#">)
    I've also tried:
                   and AnnounceNum IN (#ValueList(qAltPostID.fk_Job_AnnounceNum)#)   
    and:
                   and JOB_AnnounceNum IN
                    SELECT fk_Job_AnnounceNum
                    from JOB_JPContacts
                    Where AltJPContactType = 'AltPosterID'
                    and AltPoster = '#session.IHSUID#'
    ERROR is: one record should return. I get 0.
    PART # 2: Here's the QoQ part.
    I get the error:
    Query Of Queries runtime error.
    Comparison exception while executing IN.
    Unsupported Type Comparison Exception: The IN operator does not support comparison between the following types:
    Left hand side expression type = "LONG".
    Right hand side expression type = "STRING".
    A tutorial I found gave an example using only one column for this part of the fix:
         tot_AllCurrentDraftListing = QueryNew("AnnounceNum", "CF_SQL_VARCHAR")
    How would I set up the query with the datatype when I'm using multiple columns:
    <cfscript>
            tot_AllCurrentDraftListing = QueryNew("AnnounceNum, JP_PDLoc, JP_JS_Title, JP_JS, JP_KW_1, JP_JobTitle, JP_Open, JP_Close, JP_CloseType, JP_CloseName, JP_PosNeed, JP_DirectHire, JP_Desc, JP_Draft, JP_Archived, JP_State, JP_AreaName, JP_AreaID, JP_AreaAlias, JP_Fac_SU, JP_Fac_Facility, JP_FAC_ID, JP_Grade1, JP_sal_low1, JP_sal_high1, JP_Grade2, JP_sal_low2, JP_sal_high2, JP_Grade3, JP_sal_low3, JP_sal_high3, JP_Grade4, JP_sal_low4, JP_sal_high4, JP_Grade5, JP_sal_low5, JP_sal_high5, JP_Posted, JP_TypeHire, JP_HRemail");
        </cfscript>
    I used this code after all the cells contained values and before running my QoQ query:
            <cfloop index="intID" from="1" to="#tot_AllCurrentDraftListing.recordcount#" step="1">
                <cfset tot_AllCurrentDraftListing["AnnounceNum"] [intID] = JavaCast("string", intID) />
            </cfloop>
              Is that correct?
    Thanks.
    Whoever can help me with this should be awarded extra points ! ! ! !

                and AnnounceNum IN (<cfqueryparam cfsqltype="CF_SQL_varchar" value="#ValueList(qAltPostID.fk_Job_AnnounceNum)#">)
    If you're passing a list as a param, you need to tell <cfqueryparam> it's a list.  Read:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_18.html#1102474
    ERROR is: one record should return. I get 0.
    It's a bit hard to comment on this sort of thing without knowing the data involved.
    A tutorial I found gave an example using only one column for this part of the fix:     tot_AllCurrentDraftListing = QueryNew("AnnounceNum", "CF_SQL_VARCHAR")
    How would I set up the query with the datatype when I'm using multiple columns:
    Again, this is a matter of reading the relevant docs:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/functions_m-r_19.html#292759
    As a general rule, if you're having trouble with the syntax of a CFML statement, look it up in the docs.
    Adam

  • Query on ABAP List Viewer and Table Control?

    Hi all,
    I was trying to solve the exercises in these areas....but was unable to do as some of the concepts were not clear to me as I'm new to this field.
    So Can any one help me out in giving me the Notes or attachments on the ABAP List Viewer(A.L.V.) and Table Control.
    My ID: [email protected]
    Waiting for a reply...
    A New Entrant in ABAP.
    Message was edited by:
            saikumar b

    Hi saikumar,
    I just start to work with Abap too. All links i Know:
    http://www.erpgenie.com/abap/controls/alvgrid.htm
    http://www.abapfans.hpg.ig.com.br/links.htm
    http://abap4.tripod.com/index..html
    http://paginas.terra.com.br/educacao/abap/
    http://www.sdn.sap.com/
    http://www.sap-img.com/
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.abap4.com.br/
    http://www.erpgenie.com/sap/abap/index.htm
    Good lucky

  • Numbers Question, Finding Values In Multiple Sheets and Tables

    I would like for a cell to be looking at all sheets, and calculate the Debt 1 or Debt 2 allocated funds. It would need to find the word, Debt 1 and take the number two cells to the right...I have attached a document to my webpage...
    http://web.me.com/chris.ducasse/Forum/ForumBlog/Entries/2010/1/12009_Bi-Weekly_Budgets_ForForums.html

    Hello
    Working on the OP's document, I discovered a surprising odd behaviour.
    In a table I grab datas from other tables using VLOOKUP.
    The formula is :
    =IFERROR(VLOOKUP(A$1,INDIRECT("Outgo "&ROW()&" :: A:C"),3,FALSE),0)
    The cell in B1 grabs a value from table Outgo 1
    The cell in B2 grabs a value from table Outgo 2
    As the OP named its first table Outgo, when I named it Outgo 1,
    I decided to edit the formula in cell B1. It becomes ::
    =IFERROR(VLOOKUP(A$1,INDIRECT("Outgo :: A:C"),3,FALSE),0)
    The funny behaviour is that in a sheet where there is no Outgo table (I had the "Outgo 1" one),
    the formula continue to return the value grabbed from the table "Outgo 1".
    For see, I renamed "Outgo 1" as "Outgo 3" with a different numerical value.
    The formula referencing "Outgo" continue to return the value which was in "Outgo 1"
    Continuing to play with this problem.
    I edited the formula as:
    =IFERROR(VLOOKUP(A$1,INDIRECT("Outgo 3 :: A:C"),3,FALSE),0)
    Bingo, it grabbed the value from the true Outgo 3 table.
    One more time I edited the formula as:
    =IFERROR(VLOOKUP(A$1,INDIRECT("Outgo :: A:C"),3,FALSE),0)
    Son of a …, it gives again the value which was in the now unavailable table "Outgo 1".
    I guess that it grabs it from the undo buffer but it's absolutely foolish.
    Serious smelling of bug but I wish to know if you get the same behaviour in other machines (maybe something is odd on mine).
    Happily, there is a way to get rid of this odd behaviour :
    cut the entire formula
    press return
    The cell is now empty.
    Select it then paste.
    The pasted formula will have a correct behaviour.
    Yvan KOENIG (VALLAURIS, France) samedi 2 janvier 2010 16:37:16

  • Query to table in Database Link returns value from local table

    Hi
    I made a databaselink (Create database link db_a.world connect to db_a identified by <user> using 'db_a.world')
    Then I query a table, connected as a user in db_b.world (this is our developer database - identical to db_a): Select count(*) from table@db_a.world.
    When I get the result - it comes from the database I am logged in to (db_b)! - This is easy to check, because when I run select count(*) from table - it shows the same number. When I connect to the remote database, the same query shows another (correct) number.
    When I created the database link, Oracle demanded a loopback clause. Why is that, and can this be the reason for the strange behaviour?
    Thanx
    Anders
    Narvik, Norway

    Hi Anders,
    A loopback database link is when you want to test connecting to the same database as say a different user. It can be used for testing purposes. Creating a database link doesn't require a loopback clause. The reason why you are getting the same row count as db_b.world because db_a.world has been created as a loopback link.
    In the example you have Create database link db_a.world connect to db_a identified by <user> using 'db_a.world' , the clause after 'connect to' is meant to be the username and the clause after 'identified by' is meant to be the password.
    So, create a regular database link like this:
    create database link db_a_link connect to <user> identified by <passwd> using <service name>
    You shouldn't get an error message that the loopback clause has to be specified. Then try querying and hopefully it will work.
    -Raj

  • Problem with Cast and table operator

    Hi ,
    Am using Table and cast opertor to fetch the data from a collection using a ref cursor as follows
    OPEN test_cur for
    SELECT first_name, Last_name from table(cast( V_Test_collection as Test_Array));
    This works but when i tried to fetch the date using following query and ref cursor then i received ORA-00604 and ORA 01003.
    I used string containg the query like follows
    V_SQL:= ' SELECT first_name, Last_name from table(cast( V_Test_collection as Test_Array))';
    OPEN test_cur for V_SQL;
    I want to pass this V_SQL variable to another procedure that will use it to apply some business logic.Please help me how to resolve this problem.

    Hi, Current procedure is as follows but as per new requirement i have to pass the processed data from this procedure to a common procedure that accepts the string containing the query(Say IN_QUERY) and applies the business logic by fetching the data from this query(IN_QUERY)
    CREATE OR REPLACE PROCEDURE GET_USER_INFO_PRC(USER_ID IN NUMBER,
    TEST_CUR OUT COMMOM_PKG.OUT_REF_CUR,
    O_ERROR_CODE OUT NUMBER,
    O_ERROR_LOCATION OUT VARCHAR2,
    O_ERROR_MESSAGE OUT VARCHAR2) IS
    V_TEST_COLLECTION COMMOM_PKG.WI_INS_SEARCH_ARR_OBJ := WI_INS_SEARCH_ARR_OBJ();
    BEGIN
    Some buniess logic is applied on V_Test_collection to fetch the date in this block
    OPEN TEST_CUR FOR
    SELECT FIRST_NAME, LAST_NAME
    FROM TABLE(CAST(V_TEST_COLLECTION AS TEST_ARRAY));
    Exception handler
    END;

  • Storage Location Wise Stock Value field and Table

    Hi ,
    Please let me know the storage location wise stock value field and table.
    Regards
    Suresh

    Hi Suresh,
    As per my understanding it is not possible in a single Table.
    If this is required for customized Z report then use this logic it may gives the correct information.
    In the combination of MARD and MBEW.. From MBEW you can get the value for each Base Unit of Measure then multiply that value with storage location stock.
    It may usefull to u..in the mean time i will try for some other option.
    Please revert if u have any query.
    Regards
    Durga Sana

Maybe you are looking for