Works in SQL Workshop, not in LOV Definition

I developed a query
select distinct b.pointname display_value,a.pointnumber return_value
from e_sub08@scadahst_xajardb a, analogpoint@scadahst_xajardb b
where a.pointnumber = b.pointnumber
in SQL Workshop and I get the dataset that I need when I run it there. When I went to plug it into an LOV as a shared component in an application, I get the message "LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query."
Why in one, but not the other? Any suggestions as to what I need to change?
Thanks!

Hi Kofi,
Many thanks for that, Kofi - I hadn't even noticed that that option was available!!!!
In order to set this up, you need to define the LOV through Shared Componets, Lists of Values rather than on the page item itself. (Note that there is a typo in the example code - depno should be DEPTNO :D )
I've just set up an example using this: [http://apex.oracle.com/pls/otn/f?p=34398:12] - pick any dept apart from the one shown at the top as being deptno = 10 and the second list is empty. Select the department that is deptno = 10 and you get the employees.
The LOV is defined as:
IF v('P12_DEPTNO') = '10' THEN
  RETURN
  'SELECT ename d, empno r '||
  'FROM emp '||
  'WHERE DEPTNO = 10 ORDER BY 1';
ELSE
  RETURN
  'SELECT ename d, empno r '||
  'FROM emp '||
  'WHERE DEPTNO = 1234 ORDER BY 1';
END IF;Therefore, you could have as many SELECT statements as you like provided all of them return a valid LOV recordset
Andy

Similar Messages

  • Select works in SQL Workshop, but not as an LOV

    I want all venues to appear in my LOV
    With their affiliated Performing Arts Center, if one exists.
    I get the perfect results when I run it in SQL Workshop.
    When I try to create the LOV, I'm told it's invalid, because it includes an in-line query and the first FROM clause must not belong in the in-line query.
    Not quite sure what it means, but I'm sure I don't know how to fix it...
    SELECT
    v.VENUE_NAME, p.pac_name d,
    v.VENUE_ID r
    from pac p, VENUES v
    where v.venue_pacid = p.pac_id(+)
    thanks
    Marion

    I'm told it's invalid, because it includes an in-line query and the first FROM clause must not belong in the in-line query.Think that's just an example of why a query might be invalid, as this query clearly doesn't have that.
    Jari's right, it has to only return 2 columns, so the venue and PAC values need merged somehow, like:
    SELECT
             v.VENUE_NAME || nvl2(p.pac_name, ' (', null) || p.pac_name || nvl2(p.pac_name, ')', null) d,
             v.VENUE_ID r
    from     pac p, VENUES v
    where    v.venue_pacid = p.pac_id (+)

  • Username password works in SQL Plus not in SQL Developer

    I have SQL Dev 1.2.1. It works fine with some databases, but with two databases with logons managed by Oracle Enterprise User it does not work. I receive an Ora 01017 error invalid username password. The user name and password work fine from SQL Plus and from a third party tool. I have a local developer client environment installed, so am using TNS. SQL Developer was installed before the client environment. I was not trying to access this database before the client environment install. I was using the basic connection before the client install. Neither basic or TNS connection works for this particular database.
    Any ideas?

    We have changed the password and it still does not work. There are no special characters in the password.
    I am tempted to think the problem is the jdbc driver versions. The logon for Enterprise user controlled databases stopped working after I installed the thick client Oracle developer. I have tried to find the threads with information on disabling the thick client jdbc but have not found them. I also have tried to enter a URL for the thin client without success. One of our DBAs is saying that the 11g clients are broken and he is in communication with Oracle about it. He says 10g works but 11g does not.
    Any further help would be appreciated.
    Gerry

  • DB Link - works via SQL but not via packages

    I have a database link on user ODB on database A, to database B. The DB Link seems fine for SQLs that i do, but doesn't compile in my package code. Please tell me why it works for "regular sqls" but not inside a package.
    Example: while connected as ODB user on database A, if I do this query:
    SELECT "TRAXDOC_DETAIL"."FILE_NAME",
    "TRAXDOC_DETAIL"."FILE_TYPE",
    FROM "TRAXDOC_DETAIL"@TRAXDOC_LINK
    WHERE "TRAXDOC_DETAIL"."TRAXDOC_ROW_ID" = 100031 AND
    "TRAXDOC_DETAIL"."TRAXDOC_LINE"= 2
    It works fine. But the same query inside a package that is owned by user ODB on database A will not compile, stating the table/view does not exist.
    The database link is owned by use ODB on database A, connects directly to the owner of the tables in question on database B.
    Any suggestions welcome... this is an urgent issue, because it also worked fine on my customer's test environment, but not on their Production that they just upgraded. I need to know what to look for as to what could be wrong.

    Thanks so much for your response - Prefixing the call to the table within the package, with the schema owner does indeed solve the problem. Since this is a Production issue, i have implemented this fix in my customer's database.
    However, I would still like this issue permanently resolved. The next time we send out updated package code, this will happen again (unless we then fix it again). I'd still like info from anyone on what exactly must be done to allow the call within the package to work without specifically pre-fixing the table's schema owner. It shouldn't be needed... The DB link is connecting via the same schema on database B that owns the table in question.
    pre-fixing the schema owner is something we don't do in our sql statements, and this has worked fine for many of our cusomer's environments. We're only seeing this issue on one environment.

  • 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 in sql but not if  forrms!!!!

    I transferred my column apprnum from tblrefstaff to paymast using
    SQL>update paymast set paymast.apprnum=(select tblrefstaff.apprnum from tblrefstaff where tblrefstaff.empno=paymast.empno and rownum=1);
    5072 rows updated
    Now i query for the records in paymast
    SQL> select empno from paymast where apprnum='338';
    EMPNO
    2217
    SQL> select apprnum from paymast where empno='2217';
    APPRNUM
    338
    Now in forms when i write this under POST-QUERY
    begin
         select apprnum
         into :paymast.apprnum
         from paymast
         where empno = :paymast.empno;
    exception when no_data_found then null;
         end;
    no data is retrieved in to the item apprum
    its only retrieved when the name of table is that of the previous one like this
    begin
         select apprnum
         into :paymast.apprnum
         from tblrefstaff
         where empno = :paymast.empno;
    exception when no_data_found then null;
         end;
    2nd CASE: after transferring apprnum to paymast all the items are now under paymast so i just removed the code under POST-QERY and the set the datbase item to yes and column name to APPRNUM but still no use
    It only fetches records in apprnum using
    select apprnum
         into :paymast.apprnum
         from tblrefstaff
         where empno = :paymast.empno;
    exception when no_data_found then null;
         end;
    how should solve this.?
    Edited by: Suhail Faraaz on Nov 10, 2009 2:10 AM

    i think you forgot to commit; after executing update stmt..
    It will work in SQL becoz, you wrote the Query immediately after the select stmt.
    But Forms is in another session, it cannot access the data until you commit the SQL session.
    Regards
    Dora
    Edited by: Dora on Nov 10, 2009 2:26 PM

  • SQL works in SQL workshop but not in APEX

    Hi All,
    I'm trying some sample sql to get around the 32k limit in APEX and even though the sql works in SQLWorkshop, when I use it as a source for textarea object in APEX I get an error. Here's the SQL:
    declare
    l_code clob := empty_clob;
    l_clob_source2 clob;
    offset int:=1;
    begin
         select replace("CHNL_PRTNR_XML_TRAN"."XML_TRAN", '<', '<') into l_code from "CHNL_PRTNR_XML_TRAN" where "CHNL_PRTNR_XML_TRAN"."VITRIA_DROP_OFF_SEQ_ID" = :P2_TRAN_ID;
    loop
    l_clob_source2 := dbms_lob.substr(l_code,4000,offset);
    htp.prn(l_clob_source2);
    exit when offset + 4000 >= nvl(dbms_lob.getlength (l_code),0);
    offset := offset + 4000;
    end loop;
    end;
    Here's the error message I get APEX:
    ORA-06550: line 13, column 17: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; The symbol ";" was substituted for "end-of-file" to continue.
    Error ERR-1019 Error computing item default value: page=2 name=P2_XMLTRAN.

    Try to set it to SQL Query (PL/SQL-Functions Body), then it should work

  • "Between NVL" - Works in SQL Command, not in APEX report region

    First, I realize I could use dynamic SQL (model 4), but I don't want to (too hard just yet).
    I have a select statement with a series of Where conditions that employ values, in bind variables, supplied by the user.
    I want the choice of parameters to be optional, so I am checking for and replacing nulls.
    Select emp_name from employee_table where
    emp_rating between nvl(:p7_rating_choice, 0) and nvl(:p7_rating_choice, 99)
    and
    emp_language_no between nvl(:p7_lang_choice, 0) and nvl(:p7_lang_choice, 99);
    (the binds should be numeric).
    The actual statement is quite a bit longer, but the point is that the BETWEEN NVL(:x, min) AND NVL(:x, max) piece does not seem to work when used in a report region.
    It works fine if ALL parameters are provided, but returns an error if one or more are null.
    In the SQL command window it works (with a pop-up) just fine.
    By the way, the :p7_lang_choice bind variable is chosen from a LOV list which works in all other cases.
    Also, if I disable nulls (choosing "no" in ITEM page), everything works fine. It seems that the substitution of the min and max values via the NVL returns the wrong data type.
    Any ideas what I have done wrong?

    Thanks Scott.
    Every day brings a little more understanding!
    I also noticed a simplified method in the APEX documentation (although there was no explanation of the code) as follows:
    Where
    (column = :p1_user_input_1 OR :p1_user_input_1 = [null substitution value])
    AND
    (column = :p1_user_input_2 OR :p1_user_input_2 = [null substitution value])
    AND
    etc...
    Using the value you provide in the LOV section for the null, the second part of the OR handles the null situation.
    For some reason I was so tied up with comparing to the column that I never thought to have an OR with a compare to something else.
    Oh well.
    Thanks,
    Norm

  • DECODE works in SQL but not in a CURSOR

    I have simplified my problem to "DUAL":
    While in a SQL session :
    select decode(
    (select 1 from dual)
    ,(select 1 from dual)
    ,1
    ,0)
    from dual;
    Expected result: 1;
    Actual result: 1;
    Place this code in a PL/SQL block :
    declare
    X number;
    begin
    SELECT decode(
    (select 1 from dual)
    ,(select 1 from dual)
    ,1
    ,0)
    INTO X;
    FROM dual;
    end;
    Expected Result: X=1;
    Actual Result: ORA-06550 & PLS-00103 "Encountered the symbol SELECT".
    My Question:
    Why can't I place a select within a decode while in a PL/SQL block? I have also tried this in an Explicit cursor.

    This is another of those cases when the PL/SQL engine does not support a feature/syntax of the SQL engine. To do this in PL/SQL, execute it as dynamic SQL (which uses the SQL engine):
    declare
    X number;
    begin
      execute immediate
        'SELECT decode((select 1 from dual),' ||
                      '(select 1 from dual),1,0) ' ||
        '  FROM dual' into x;
      dbms_output.put_line( x );
    end;

  • 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 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
    -----------------

  • Abnormal, Same query get data in sql but not working on Fron-end

    Dear,
    Version :Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    We have created packed in oracle database befor two months ago & was working fine, but since morning select statment in package is not working while running via application which mentioned below and raise not data found but surprising thing is that same query is getting data when we execut on sql plus return one record.
    i don't know either it's abnormal behaviour or sth else becuase the same query run without changing any singl column in where_clause work in sql but not getting data while submition request through oracle application and raising not data found.
    --thankse
    Edited by: oracle0282 on Dec 29, 2011 2:20 AM

    Actully when i run this query in sql it return one record on the same parameter, while when we exeucte this select in pl/sql on the same parameter oracle raise no data found error.
    so i got confused the same query with same parameter retur record in sql but when we call it fron-end through packege raise 'no data found error'.
    hope you understand now.
    --thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ORA-01031: insufficient privileges in PL/SQL but not in SQL

    I have problem with following situation.
    I switched current schema to another one "ban", and selected 4 rows from "ed"
    alter session set current_schema=ban;
    SELECT * FROM ed.PS WHERE ROWNUM < 5;
    the output is OK, and I get 4 rows like
    ID_S ID_Z
    1000152 1
    1000153 1
    1000154 1
    1000155 1
    but following procedure is compiled with warning
    create or replace
    procedure proc1
    as
    rowcnt int;
    begin
    select count(*) into rowcnt from ed.PS where rownum < 5;
    end;
    "Create procedure, executed in 0.031 sec."
    5,29,PL/SQL: ORA-01031: insufficient privileges
    5,2,PL/SQL: SQL Statement ignored
    ,,Total execution time 0.047 sec.
    Could you help me why SELECT does work in SQL but not in PL/SQL procedure?
    Thanks.
    Message was edited by:
    MattSk

    Privs granted via a role are only valid from SQL - and not from/within stored PL/SQL code.
    Quoting Tom's (from http://asktom.oracle.com) response to this:I did address this role thing in my book Expert one on one Oracle:
    <quote>
    What happens when we compile a Definer rights procedure
    When we compile the procedure into the database, a couple of things happen with regards to
    privileges.  We will list them here briefly and then go into more detail:
    q    All of the objects the procedure statically accesses (anything not accessed via dynamic SQL)
    are verified for existence. Names are resolved via the standard scoping rules as they apply to the
    definer of the procedure.
    q    All of the objects it accesses are verified to ensure that the required access mode will be
    available. That is, if an attempt to UPDATE T is made - Oracle will verify the definer or PUBLIC
    has the ability to UPDATE T without use of any ROLES.
    q    A dependency between this procedure and the referenced objects is setup and maintained. If
    this procedure SELECTS FROM T, then a dependency between T and this procedure is recorded
    If, for example, I have a procedure P that attempted to 'SELECT * FROM T', the compiler will first
    resolve T into a fully qualified referenced.  T is an ambiguous name in the database - there may be
    many T's to choose from. Oracle will follow its scoping rules to figure out what T really is, any
    synonyms will be resolved to their base objects and the schema name will be associated with the
    object as well. It does this name resolution using the rules for the currently logged in user (the
    definer). That is, it will look for an object owned by this user called T and use that first (this
    includes private synonyms), then it will look at public synonyms and try to find T and so on.
    Once it determines exactly what T refers to - Oracle will determine if the mode in which we are
    attempting to access T is permitted.   In this case, if we as the definer of the procedure either
    owns the object T or has been granted SELECT on T directly or PUBLIC was granted SELECT, the
    procedure will compile.  If we do not have access to an object called T by a direct grant - the
    procedure P will fail compilation.  So, when the object (the stored procedure that references T) is
    compiled into the database, Oracle will do these checks - and if they "pass", Oracle will compile
    the procedure, store the binary code for the procedure and set up a dependency between this
    procedure and this object T.  This dependency is used to invalidate the procedure later - in the
    event something happens to T that necessitates the stored procedures recompilation.  For example,
    if at a later date - we REVOKE SELECT ON T from the owner of this stored procedure - Oracle will
    mark all stored procedures this user has that are dependent on T, that refer to T, as INVALID. If
    we ALTER T ADD  some column, Oracle can invalidate all of the dependent procedures. This will cause
    them to be recompiled automatically upon their next execution.
    What is interesting to note is not only what is stored but what is not stored when we compile the
    object. Oracle does not store the exact privilege that was used to get access to T. We only know
    that procedure P is dependent on T. We do not know if the reason we were allowed to see T was due
    to:
    q    A grant given to the definer of the procedure (grant select on T to user)
    q    A grant to public on T (grant select on T to public)
    q    The user having the SELECT ANY TABLE privilege
    The reason it is interesting to note what is not stored is that a REVOKE of any of the above will
    cause the procedure P to become invalid. If all three privileges were in place when the procedure
    was compiled, a revoke of ANY of them will invalidate the procedure - forcing it to be recompiled
    before it is executed again. Since all three privileges were in place when we created the procedure
    - it will compile successfully (until we revoke all three that is). This recompilation will happen
    automatically the next time that the procedure is executed.
    Now that the procedure is compiled into the database and the dependencies are all setup, we can
    execute the procedure and be assured that it knows what T is and that T is accessible. If something
    happens to either the table T or to the set of base privileges available to the definer of this
    procedure that might affect our ability to access T -- our procedure will become invalid and will
    need to be recompiled.
    This leads into why ROLES are not enabled during the compilation and execution of a stored
    procedure in Definer rights mode. Oracle is not storing exactly WHY you are allowed to access T -
    only that you are. Any change to your privileges that might cause access to T to go away will cause
    the procedure to become invalid and necessitate its recompilation. Without roles - that means only
    'REVOKE SELECT ANY TABLE' or 'REVOKE SELECT ON T' from the Definer account or from PUBLIC. With
    roles - it greatly expands the number of times we would invalidate this procedure. If some role
    that was granted to some role that was granted to this user was modified, this procedure might go
    invalid, even if we did not rely on that privilege from that role. ROLES are designed to be very
    fluid when compared to GRANTS given to users as far as privilege sets go. For a minute, let's say
    that roles did give us privileges in stored objects. Now, most any time anything was revoked from
    ANY ROLE we had, or any role any role we have has (and so on -- roles can and are granted to roles)
    -- many of our objects would become invalid. Think about that, REVOKE some privilege from a ROLE
    and suddenly your entire database must be recompiled! Consider the impact of revoking some system
    privilege from a ROLE, it would be like doing that to PUBLIC is now, don't do it, just think about
    it (if you do revoke some powerful system privilege from PUBLIC, do it on a test database). If
    PUBLIC had been granted SELECT ANY TABLE, revoking that privilege would cause virtually every
    procedure in the database to go invalid. If procedures relied on roles, virtually every procedure
    in the database would constantly become invalid due to small changes in permissions. Since one of
    the major benefits of procedures is the 'compile once, run many' model - this would be disastrous
    for performance.
    Also consider that roles may be
    q    Non-default: If I have a non-default role and I enable it and I compile a procedure that
    relies on those privileges, when I log out I no longer have that role -- should my procedure become
    invalid -- why? Why not? I could easily argue both sides.
    q    Password Protected: if someone changes the password on a ROLE, should everything that might
    need that role be recompiled?  I might be granted that role but not knowing the new password - I
    can no longer enable it. Should the privileges still be available?  Why or Why not?  Again, arguing
    either side of this is easy. There are cases for and against each.
    The bottom line with respect to roles in procedures with Definer rights are:
    q    You have thousands or tens of thousands of end users. They don't create stored objects (they
    should not). We need roles to manage these people. Roles are designed for these people (end users).
    q    You have far fewer application schema's (things that hold stored objects). For these we want
    to be explicit as to exactly what privileges we need and why. In security terms this is called the
    concept of 'least privileges', you want to specifically say what privilege you need and why you
    need it. If you inherit lots of privileges from roles you cannot do that effectively. We can manage
    to be explicit since the number of development schemas is SMALL (but the number of end users is
    large)...
    q    Having the direct relationship between the definer and the procedure makes for a much more
    efficient database. We recompile objects only when we need to, not when we might need to. It is a
    large efficiency enhancement.
    </quote>

  • [[DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Column name or number of supplied values does not match table definition.]

    Hii ..
    need help on this ..
    This what I am doing ..
    I am using a DATAEXPORT function to export level0 data from my essbase 11.1.2.2 to Microsoft SQL 2008 tables.
    So what I did first I exported the level0 data to a flat file using DATAEXPORT and the created the SQL columns by the same  in that order only in my SQL table.
    When I run it fails with this error:
    ODBC Layer Error: [21S01] ==> [[DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Column name or number of supplied values does not match table definition.]
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021014)
    ODBC Layer Error: Native Error code [213]
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Error(1012085)
    Unable to export data to SQL table [dataexp]. Check the Essbase server log and the system console to determine the cause of the problem.
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021002)
    SQL Connection is Freed
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Warning(1080014)
    Transaction [ 0x1c50001( 0x51ee7d66.0x80342 ) ] aborted due to status [1012085].
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1012579)
    Total Calc Elapsed Time for [test.csc] : [1.44] seconds
    =============================================================
    I did a simple test on my Sample.basic application then ..
    loaded the calc data to it and then used the below script to export to a flat file
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
                    DataExportLevel "Level0";
                    DataExportOverwriteFile ON;
                    DataExportColFormat OFF;
                    DataExportDimHeader OFF;
    FIX(
                "Jan",
                "Sales",
                "Actual"
    /*DATAEXPORT "File" "," "/home/hypadmin/samtest.txt";*/
    DATAEXPORT "DSN" "Abhitest" "sample" "sa" "welcome1";
    ENDFIX
    out put as below:
    "Sales"
    "100-30","California"
    "Jan","Actual",145
    Now In sql I created only 3 columns with name Jan/Sales/Actual and when I run this script again with comments removed .. I get the same error as what I have got in my first test case with other application ..
    but when I create the columns with same name as what its in export
    Sales/100-30/Califirnia/Jan/Actual
    It created the new rows successfully ..
    So with this I think the error which I am getting with my other application might be because of the same column issue  .. but then I have created all the columns by looking at the export file only as I did in sample ..
    Any idea would be helpful ..
    Thanks
    Abhishek
    I

    First make sure you add
    DataExportRelationalFile ON;
    to your set commands it is missing
    I alwats like to also add
    DataExportColHeader dimensionName;
    so I am sure what dimension is getting put into the columns.
    Then count the number of dimensions in your outline (exclude attribute dimensions). You need at least that many columns in your table  -1 + the number of  members you will be returning as columns in the export
    Taking your example Sample basic has 5 dimensions
    Measures
    Years
    Scenario
    Product
    Market
    Since you did not specify a dataexportcolheader it took the dense dimension Scenario as the columns. Your fix statement is limiting that to one member. Doing the math
    5 -1 + 1 = 5 columns in your table which is what you found works.  Suppose you fixed on bothe Actual and budget in scenario then you would need 6 columns 5 -1 +2

  • Hyper links not working in SQL Query in Version 1.6 using htf.anchor

    hi All
    have written a sql query to generate a hyperlink with htf.anchor and not able to generate the links for the same
    following is the query:
    select HTF.ANCHOR('F?P=119:1:'||:APP_SESSION,'ADMIT =&gt;')
    ||COMPANY_NAME AS "AUTHORIZED VISITORS" from
    company_details
    any help is appreciated....
    thanks in advance
    Sukhmani

    Hi Scott
    The Hyperlinks are not getting generated...after using HTF.ANCHOR and was working fine with 1.5 after upgarding to 1.6 its just showing the <A href> as it is without the hyperlink.
    The first one i was trying in the SQL workshop and the second one is 'm using in the code itself.
    'm not able to c the hyperlinks at runtime
    its showing it as
    $ 0 Total Support
    after using the code
    select htf.anchor('f?p=119:8:'||:app_session,'$'||lpad(nvl(sum(apps_revenue+tech_revenue),0),10,' ')) ||lpad('Total Support',50,' ')
    from company_details
    where duns_no=:P3_DUNS_NO or
    duns_no in (select duns_no from company_details where upper(company_name) like upper(:P3_COMPANIES))

Maybe you are looking for

  • HOw Can I remove faces from the URL

    I know that it's in the web.xml file but as soon as i remove the faces part from the file nothing works. Someone please tell me how to properly remove "faces" from the url. Example http:.//localhost:8080/croot/Page1.jsp Thanks in advance

  • Nokia E72 encryption & OVI Maps

    Hi, I have two issues about the E72: 1. My E72 came with a 4GB microSD card with OVI Maps installed on it. Unfortunately there are only 1023 MB free out of 4GB, so I planned to buy a bigger card. I would like toi know if I can simply copy all the dat

  • Replication fail-over and reconfiguration

    I would like to get a conversation going on the topic of Replication, I have setup replication on several sites using the Netscape / iPlanet 4.x server and all has worked fine so far. I now need to produce some documentation and testing for replicati

  • TS3274 My ipad shows 4 updates for the apps but the ipad doesn't update

    IPad has 4 updates to do and the unit does not update.

  • Can't use the color from Eyedropper

    Hi, so I'm studying Photoshop these days and I learned about eyedropper function. The problem is when I used the eyedropper function, it seems the color was uploaded to the palette but when I tried to brush with the color that I selected from the eye