This query works in TOAD but not in forms 6i,

Hi,
It shows error identifier 'ATTRIBUTES' must be declared. what is this error about ?
BEGIN
select distinct B.TEXT into v_lbl
from
SAMS S, TABLE(ATTRIBUTES) A, TABLE(ATTRIBUTES) B, LOCATIONS LS
where
S.ID = :P_ ID and
A.NAME = 'DISL' and
B.NAME='BL'
SL.ID(+) = S.ID and
SL.STAT(+) = 'HIGH' ;
return(v_lbl);
END;
Thanks
Bcj

returning valueswhat values? 1 or more?
when i compile it shows the errorwhat's the error?

Similar Messages

  • Query working in sql but not in forms

    hi this is my query
    insert into sa_prod_temp
    select sa_idno,sa_srno_desc,count(*) qty from sa_master,
              select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from
                   select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from bom_sa_prod
                   order by sa_prod_date desc
              where rownum <=50
         ) b
         where sa_type = :dummy.sa_code and sa_type = sa_code
         and sa_master.sa_srno = b.sa_idno
         group by sa_idno,sa_srno_desc     ;

    insert into sa_prod_temp
    select sa_idno,sa_srno_desc,count(*) qty from sa_master,
    select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from
    select sa_code,sa_idno,sa_prod_date,sa_srno,sa_srno1 from bom_sa_prod
    order by sa_prod_date desc
    where rownum <=50
    ) b
    where sa_type = :dummy.sa_code and sa_type = sa_code
    and sa_master.sa_srno = b.sa_idno
    group by sa_idno,sa_srno_desc ;
    VALUE CLASS IS MISSING
    -----------------

  • Connect by prior working in sql but not in forms 10g hierarchical tree

    Hello Friends,
    I have the following connect by prior example which is working in sql command prompt but not in Forms 10g hierarchical tree item type. Can you please let me know why ?
    configuration: Forms 10g patchset 10.1.2.0.2 and oracle 11g database on windows 7
    SQL> SELECT 1 InitialState,
    2 level Depth,
    3 labeller NodeLabel,
    4 NULL NodeIcon,
    5 to_char(reportno) NodeValue
    6 FROM reports where formname = 'billinin.fmx' or reportno > 9999
    7 start with reportno > 9999
    8 CONNECT BY PRIOR reportno = labelno
    9 /
    INITIALSTATE DEPTH NODELABEL N NODEVALUE
    1 1 FIRST 10000
    1 2 report1 UD Label 1
    1 2 report2 UD Label 2
    1 2 report3 UD Label 3
    1 1 SECOND 10001
    1 1 THIRD 10002
    If I write this command in forms hierarchical tree, then it is working, why not the above code ?
    SQL> SELECT 1 InitialState,
    2 level Depth,
    3 labeller NodeLabel,
    4 NULL NodeIcon,
    5 to_char(reportno) NodeValue
    6 FROM reports
    7 start with reportno > 9999
    8 CONNECT BY PRIOR reportno = labelno

    Thanks Room,
    This command worked ! I will put the sample working code here. It will help you to filter the records in a tree in sql command prompt as well as in forms hierarchical tree 10g.
    SELECT 1 InitialState,
    level Depth,
    labeller NodeLabel,
    NULL NodeIcon,
    to_char(reportno) NodeValue
    FROM reports
    start with reportno > 9999
    CONNECT BY PRIOR reportno = labelno
    AND FORMNAME = :reports.testitem

  • Query working fine in toad but not in forms 6i

    i have following coding on when button press triger
    declare
    CURSOR C1(year number,month number) IS
    SELECT ITM_NO,ITM_NAME,XAQ QTY,XAQ*TP VAL,gp
    FROM
    select ci.itm_no ITM_NO,ci.itm_name ITM_NAME ,cpg.group_id gp ,xaq ,ALLIED.CORP_PRIC_TP( ci.itm_no)TP from
    select prod_no,sum(xaq)*1 xaq
    from
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_01_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_02_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_03_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_04_02
    where year=year and f_prd=month
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    group by prod_no
    ) A,allied.corp_inv ci,allied.corp_01_01 c01, allied.corp_01_02 c02,allied.corp_prod_group cpg,allied.v_prod_grp vpg
    where ci.itm_no=a.prod_no
    and ci.itm_no=c02.itm_no
    and c01.grp_id=c02.grp_id
    and c01.grp_id in(55,56,57,58,59)
    and vpg.prod_no =ci.itm_no
    and vpg.group_id=cpg.group_id
    where XAQ <>0;
    Begin
         delete from fiaz.tmp_topten_prod;
         for i in c1(:year,:month)
    loop
              insert into fiaz.tmp_topten_prod
              values(i.itm_no,i.itm_name,i.qty,i.val,i.gp,0);
         end loop;      
    standard.commit;
    message('inserted in temp');
         exception when others then
              message (dbms_error_text);
              message (dbms_error_text);
    End;
    Same Query (as used in cursor c1) works fine in toad but giving wrong result from forms... and the problem is xaq field i.e returns incorrect qty...
    i guess union clause is not working in this situation...
    plz suggest me the appropriate changes in the query to work well from form as well...
    combination:Forms 6i,Oracle 8.0.6
    Regards,
    Usman Afzal

    As per your suggestion i have created a stored procedure but the followin error prevents procedure creation
    create or replace procedure fiaz.topten_prod(v_yr number,v_mn number) is
    begin
    delete from fiaz.tmp_topten_prod;
    insert into fiaz.tmp_topten_prod(itm_no,itm_name,qty,val,grp_id,prority)
    SELECT ITM_NO,ITM_NAME,XAQ QTY,XAQ*TP VAL,gp,0
    FROM
    select ci.itm_no ITM_NO,ci.itm_name ITM_NAME ,cpg.group_id gp ,xaq ,ALLIED.CORP_PRIC_TP( ci.itm_no)TP from
    select prod_no,sum(xaq) xaq
    from
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq from allied.mrk_01_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_02_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_03_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    union all
    select prod_no, sum(nvl(xrd_sqty,0)) Xaq
    from allied.mrk_04_02
    where year=v_yr and f_prd=v_mn
    and area_id in (10200,10400,10100,10300,10500,20500,20300,20100,20200,20400,30100,30400,30300,30200)
    group by prod_no
    group by prod_no
    ) A,allied.corp_inv ci,allied.corp_01_01 c01, allied.corp_01_02 c02,allied.corp_prod_group cpg,allied.v_prod_grp vpg
    where ci.itm_no=a.prod_no
    and ci.itm_no=c02.itm_no
    and c01.grp_id=c02.grp_id
    and c01.grp_id in(55,56,57,58,59)
    and vpg.prod_no =ci.itm_no
    and vpg.group_id=cpg.group_id
    where XAQ <>0;
    commit;
    end;
    Error:
    "PLS-00201: identifier ALLIED.MRK_01_02 must be declared "
    i have not changed any thing in query working fine in toad without create procedure text and if i describe this table it shows the structure (desc allied.mrk_01_02)
    Now where is the problemmmmm
    Plz Help

  • Query working from sqldeveloper but not from aspx

    Hello,
    Well Im working on an application that has different queries that involve characters such as áéíóú // ÁÉÍÓÚ // ñÑ. Now the problem is that the query works just fine coming from sqldeveloper or toad but when it's called from an aspx file it returns no rows. Any idea why this might be? It only happens when the query has at least one of the above mentioned characters.
    Here you can see an example:
    SELECT DISTINCT N_DOCUMENTO FROM PROCESOS_METODOLOGIAS WHERE "LINEA DE NEGOCIO" = 'PRODUCCIÓN' AND N_DOCUMENTO IS NOT NULL ORDER BY N_DOCUMENTO ASC;I managed to "bypass" it by using LIKE for the time being
    SELECT DISTINCT N_DOCUMENTO FROM PROCESOS_METODOLOGIAS WHERE "LINEA DE NEGOCIO" LIKE '%PRODUCCI%' AND N_DOCUMENTO IS NOT NULL ORDER BY N_DOCUMENTO ASC;But I'm sure there's a solution for that. Any hints would be greatly appreciated.
    PS: Query from aspx is made with reference 10g to version 11g on server.

    Just as I finished osting this, I found out that the problem was ust that, working with the 10g reference on the 11g server version. in case anyone needs that...

  • Query works in preview, but not when added under a Query Group

    Hello Experts-
    I'm trying to use this query as one of the options under the drop down on the Supplier Search under the Supplier Management.
    Error message:
    while trying to invoke the method com.sap.odp.comp.query.QueryParamValue.getPromptParamDef() of a null
    object loaded from local variable 'paramValue' while trying to invoke the method
    com.sap.odp.comp.query.QueryParamValue.getPromptParamDef() of a null object
    loaded from local variable 'paramValue'
    The query itself is complicated, but it works fine when executed under preview.
    Wondering if any one has ever seen this behavior and knows of any typical causes?
    Thanks,
    Mike

    Thanks for the offer, Vignesh.
    Sorry, I'm currently having trouble duplicating it, but next time it happens I'll try to get some screenshots.
    I have narrowed it down to blank values in optional string fields when the query loads. I fixed (kind of) the ones I was having trouble with by rearranging the filter parameters so there would not be blanks.
    Thanks again,
    Mike

  • XPath query works with CLOB but not with object relational

    hi all
    i have the following queries,the XQuery work with all, but XPath queries work with XMLType CLOB and Binary XML, but they do not work with XMLType as Object relational,
    select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
    from xorm;
    select extract (object_value,'movies/directorfilms[director/dirname = "L.Cohen"]/films/film[position()=2]/t')
    from xorm;
    they shows this message
    ORA-00932: inconsistent datatypes: expectd SYSTEM.name683_COLL got CHAR
    thanks

    Hi Marco
    fisrt here is my RO
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL=>'http://......../ORMovies.xsd',
    SCHEMADOC=>bfilename('DB','Movies.xsd'),
    LOCAL =>false,
    GENTYPES=>true,
    GENTABLES=>FALSE,
    CSID=>nls_charset_id('AL32UTF8'));
    END;
    create table XORM of xmltype
    xmltype store as object relational
    XMLSCHEMA "http://......../ORMovies.xsd"
    ELEMENT "movies";
    INSERT INTO XORM
    VALUES(XMLType(BFILENAME('DB','ORMovies.xml'),nls_charset_id('AL32UTF8')));
    here the XQuery format that work fine with the OR
    A/D
    select XMLQuery ('for $a in movies/directorfilms/films/film
              where $a/studios/studio = "Gaumont"
              return $a'
         passing object_value
         returning CONTENT)"TitleX"
    from xorm;
    child element query
    select XMLQuery ('for $a in movies/directorfilms/director[dirname = "Feyder"]
              let $b:=$a/../films/film[position()=2]
              return $b/t'
         passing object_value
         returning CONTENT)"TitleX"
    from xorm;
    here is the XPath format which doesn't work
    select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
    from xorm;
    select extract (object_value,'movies/directorfilms[director/dirname = "Feyder"]/films/film[position()=2]/t')
    from xorm;
    by the way all queries work fine with the CLOB or Binary XML
    many thanx Marco

  • Case Working in "TOAD" but not Working in "WHERE" clause

    Hi Friends,
    When I am using case in the where clause of SQL query in Oracle Reports 3.0.5, than it is giving me "Error - Rep - 0946 Unable to Parse Query"
    But when I am running the same query in TOAD it is working fine.
    select *from inv_stores, inv_product, inv_location
    where  (inv_stores.location_code in ('12', '13', '16', '17', '18') and
                inv_stores.location_code = inv_location.location_code and
                inv_stores.department_code = inv_product.department_code and
                inv_stores.product_code = inv_product.product_code and
                nvl(delete_flag, 'N') <> 'Y' and
                inv_product.department_code = '11' and
                       (((CASE WHEN nvl(inv_product.sale_price3jd,0) = 0 THEN 0  ELSE (nvl(inv_product.sale_price3jd,0) - nvl(inv_product.cost_pricejd,0)) /
                       nvl(inv_product.sale_price3jd,0) END) *  100 ) <= 100))
    order by inv_product.department_code, inv_product.product_codePlease Help me.......
    Thanks in Advance

    Hello,
    When you create a SQL query in Reports, Reports will parse the SQL query in order to create the "data model".
    Reports 3.0.5 is quite old, so, you can use only the SQL "supported" by the RSF included in Reports 3.0.5.
    When you use TOAD , the sql query is not parsed by TOAD but by the DB just like with sqlplus or SQL Developer.
    Regards

  • This site works in Safari but not in Firefox

    This site works fine in Safari but not in the latest version of Firefox on 2 of my computers:
    http://ase.tufts.edu/biology/labs/levin/resources/books.htm
    I've cleared cache, restarted, etc. - no good. On Safari, I see a bunch of tiled thumbnails for various books on Amazon. On Firefox, I see absolutely no thumbnails, just rows of text and horizontal lines (I can't figure out how to upload attachments here).

    Aha! Restarting without add-ons fixed it. I must have something that blocks iframes with links to Amazon books. Thanks!

  • ORA-01891 - Query works in SQL+ but not in JDev

    JDev 9.0.4 / DB 8i...
    I run a query in SQL+ and it returns results, I run it in JDev Worksheet and I get "ORA-01891: Datetime/Interval internal error".
    The query is a select from a view based on a synonym that links to a table in another DB (database link). I have boiled it down to it's "simplest" form for testing and it looks like:
    select * from some_table;
    I can also run this query in 9.0.5.2 worksheet.

    Funny you should mention that. The reason I found this error is because one of my VOs wasn't working, so I tried running the query in the worksheet. Didn't work there either but I was getting this different error (posted above). Anways, turns out the viewobject had the wrong attribute listed so I fixed that but the worksheet doesn't work.
    I don't think it's the attribute because the worksheet isn't directly connected to the VO so it shouldn't be aware of it. Additionally, only the VOs that are based on the view/synonym/link are affected.
    Thanks for the suggestion though!

  • Query works in Access but not CF

    I wrote this query initially in access to extract the data I
    wanted out of my table. In MS Access, the query works fine, returns
    the desired data. When I run the query from my CF page, i get the
    following error:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Too few
    parameters. Expected 2.
    Can anyone tell me why? Below is my query

    As the IIF function is a valid CF function, it may not be
    getting passed as 'plain text' to Access, instead CF
    may be attempting to compile the function and pass the
    result. If you can turn on debugging and for a short time set it to
    include the SQL being passed in error messages, you can see what is
    really going on.
    Another option is to create/save the query in the Access
    database and reference that instead of a table in your CFQUERY
    call. Since you are just running a staright query and not passing
    anything from CF (unless I am mistaken), calling the Access query
    for your results would work fine.
    <CFQUERY ...>
    SELECT * FROM myQueryName
    </CFQUERY>
    HTH,
    CR

  • Query works in Report but not during Edit session

    I have a report based on an SQL query, and it works perfectly from the menu in Development. It's also in Test and Production, and it works there, too. I want to change the template it's on, so I went in through the Navigator to open up and change the report. The Edit session opens up to the query, but I cannot move to any of the other tags, because it says the query is "not valid".
    It won't allow me to save the query 'as is', because it supposedly isn't valid. The report isn't locked, and prior versions (I went back to view five of them) have the same trouble. How can the query work off the menu, but not be 'valid'? We installed a patch recently, but even so, why would the query work in one spot and not another?
    Anyone have any ideas on what I can do?
    Pat Murray

    Hi,
    Please give me the query and the error the error you are getting.
    Thanks,
    Sharmila

  • This CFHTTP works under CF5 but not CF7

    Hi,
    Can some one explains to me why this code works under CF5,
    the page is returned in fileContent, but under CF7, the fileContent
    only contains "connection failure", although the status is reported
    as "200 OK".
    Also, i'd appreciate if someone could test it under CF8 and
    tell mes if the page is returned.
    Thanks.

    Hi everyone, I’m experiencing a similar prob but find
    that your suggested solutions don’t seem to work for me.
    On my remoteserever (CF7.02). it returns 408 Request Time-out
    no matter what I do. It just never connects. When submitted from my
    local server (cf8 developer) I get connected everytime. I have a
    friend with the same host (on a different server) and he has no
    probs cfttp’ing to this url with the same code.
    <cfhttp
    url="
    http://api.clickatell.com/http/sendmsg"
    resolveurl="false"
    timeout="5"
    method="post"
    >
    <cfhttpparam type="formfield" name="api_id"
    value="9999999">
    <cfhttpparam type="formfield" name="user"
    value="aaaaaaa">
    <cfhttpparam type="formfield" name="password"
    value="xxxxxx">
    <cfhttpparam type="formfield" name="from"
    value="61400000000">
    <cfhttpparam type="formfield" name="to"
    value="27999100000">
    </cfhttp>
    I’m not sure if it’s a compression issue or not.
    I tried
    <cfhttp
    url="
    http://api.clickatell.com/http/sendmsg"
    resolveurl="false"
    timeout="5"
    method="post"
    >
    <cfhttpparam type="Header" name="Accept-Encoding"
    value="deflate;q=0">
    <cfhttpparam type="Header" name="TE"
    value="deflate;q=0">
    <cfhttpparam type="formfield" name="api_id"
    value="9999999">
    <cfhttpparam type="formfield" name="user"
    value="aaaaaaa">
    <cfhttpparam type="formfield" name="password"
    value="xxxxxx">
    <cfhttpparam type="formfield" name="from"
    value="61400000000">
    <cfhttpparam type="formfield" name="to"
    value="27999100000">
    </cfhttp>
    AND
    <cfhttp
    url="
    http://api.clickatell.com/http/sendmsg"
    resolveurl="false"
    timeout="5"
    method="post"
    >
    <cfhttpparam type="header" name="Accept-Encoding"
    value="*" />
    <cfhttpparam type="Header" name="TE"
    value="deflate;q=0">
    <cfhttpparam type="formfield" name="api_id"
    value="9999999">
    <cfhttpparam type="formfield" name="user"
    value="aaaaaaa">
    <cfhttpparam type="formfield" name="password"
    value="xxxxxx">
    <cfhttpparam type="formfield" name="from"
    value="61400000000">
    <cfhttpparam type="formfield" name="to"
    value="27999100000">
    </cfhttp>
    As per
    http://www.talkingtree.com/blog/index.cfm/2004/7/28/20040729/
    and
    your suggestions only to note that none of these suggestions
    permitted a successful connection from my remote host. They all
    connect immediately from my local host.
    I also noted Dan’s quote:
    “After some more testing, it appears CFMX 7 reports the
    user agent string of "CFSCHEDULE" and not "ColdFusion". This means
    you should also add the "CFSCHEDULE" string along with the string
    "ColdFusion" to your MIME type exceptions list. “
    From:
    http://blog.pengoworks.com/index.cfm/2006/3/13/CFHTTP-Connection-Failures-issues-with-Gzip
    I’m not sure of the syntax to do this or if the GZIP
    stuff is even relevant to my server. (Yep, I’m with Godaddy)
    Anyone???

  • SQL query works for Access but not mySQL

    *I'm using the Database Connectivity VIs* Can anyone give me a clue as to why the following query works with an MS Access File DSN but not a mySQL File DSN:
    SELECT * FROM (SELECT * FROM WP100598 WHERE SerialNum LIKE '311022-05%' OR SerialNum LIKE '311022-07%') WHERE UTCTime > 1090882800 AND UTCTime < 1092870000 ORDER BY SerialNum desc
    Thank you, your help is much appreciated

    Hi,
    I don't think MySQL supports nested queries.
    Regards,
    Wiebe.
    "optobionics" wrote in message
    news:[email protected]..
    > *I'm using the Database Connectivity VIs* Can anyone give me a clue
    > as to why the following query works with an MS Access File DSN but not
    > a mySQL File DSN:
    > SELECT * FROM (SELECT * FROM WP100598 WHERE SerialNum LIKE
    > '311022-05%' OR SerialNum LIKE '311022-07%') WHERE UTCTime >
    > 1090882800 AND UTCTime < 1092870000 ORDER BY SerialNum desc
    > Thank you, your help is much appreciated

  • Why this script works in indesign but not in illustrator (cs5)?

    Hallo, i would like someone to tell me if it is possible to make a script from indesign ( i am talking about the crop marks script )
    to work in illustrator?
    It is very important to me, to make it work!
    I would appreciate if someone could help me with this?

    ok, thank you!
    So i have to ask from someone who knows scripting, to write it!
    I have seen in many sites, very good scripts doing other thinks, and also i saw one that did exactly what i wanted
    called  " Artboard_coords.app " but saddly was for mac.
    Pleaase if someone has the time to write such a script, i would very much appreciate it, and i think
    that it would be very usefull to many other designers too,  who works with digital printings,
    and have to print cards and other stuff to laser printings.
    Untill now i use the script from indesign.
    i also made an action that almost do the job, but not very handy!

Maybe you are looking for

  • How can I start a new paragraph within the same table cell?

    In Numbers, when adding text within a table frame, how can I start a new line within the same frame (rather than advancing to the next cell)?  I'd like to enter a mini-list of several items of various lengths of data.

  • Regular Expressions in the new editor

    Hi, we just ubgraded to SAP GUI 6.40 and ERP 2005, when i hit ctrl-h the search and replace dialog is popping up in the new editor. But the checkbox "regular expression" is greyed out and cant be activated. Why? cu Rainer

  • Process order confirmation getting duplicate CO documnets

    Hi PP Friends. we are having the below scenario. Our business procees requires partial confimrations & it leads at times as many as 20 partial confirmations. Norammally each partial confirmation should create one CO document .Meaning  Confirmation &

  • Default Analytics Look In Setting is not taking effect

    Hi, all This is possibly simple most of you. My Default Analytics Look In Setting is set to a book on the user, but it sets on my user account when I try to run a report, and the books are not available in the look-in selecter . I really appreciate a

  • Trouble exporting PDF spreads..  "not valid page names"

    Regardless what I enter in the "range" section, I get an error that says: "one or more of the pages specified are not valid page names" How can i again export pdfs? I've tried entering "16-19" There usually is some "Sec" thing though I can't remember