Use variable in SQL for column name

Hi All,
We want to use a user input as a column name in APEX.
For e.g user will enter "ALLOWABLE_AMOUNT" then the query will be as follows  :
select Rule,rule_name,rule_desc,"User Input" from rule_dim
where "User_input" > 100
So here the User_input will be substitued with Allowable_amount. Is this doable using any bind/substitution variables ? I tried ":P2_USER_VARIABLE" and "&P2_USER_VARIABLE." but did not work.
Please advice.

Hi Andy,
You do that with an Interactive Report and a Dynamic Action.
I'll assume that you're using APEX 4.2
Here's how:
Create Page 2 with an Interactive Report
Create New Page > Report > Interactive Report > Next > Next
Enter a SQL Select statement: select Rule,rule_name,rule_desc from rule_dim
Next > Create > Edit Page
Create the item P2_USER_VARIABLE
Add Item > Number Field > Next
Item Name: P2_USER_VARIABLE
Next > Next > Next
Source Used: Always, replacing any existing value in session state
Source Type: Static Assignment (value equals source attribute)
Create Item
Create a Dynamic Action to refresh the Interactive Report when P2_USER_VARIABLE is changed
Add Dynamic Action
Name: Refresh IRR
Next >
Event: Lose Focus
Selection Type: Item(s)
Item(s): P2_USER_VARIABLE
Next >
Action: Refresh
Next >
Selection Type: Region
Region: Report 1 (10)
Create Dynamic Action
Add the ALLOWABLE_AMOUNT to the Interactive Report
Report 1
Region Source: SELECT * FROM (select Rule,rule_name,rule_desc, :P2_USER_VARIABLE AS ALLOWABLE_AMOUNT from rule_dim) WHERE ALLOWABLE_AMOUNT > 100
Apply Changes > Apply Changes
Get the Interactive Report to submit P2_USER_VARIABLE
Report 1
Page Items to Submit: P2_USER_VARIABLE
Apply Changes
Change the Heading for ALLOWABLE_AMOUNT in the Interactive Report
Interactive Report
Change the Heading of ALLOWABLE_AMOUNT to &P2_USER_VARIABLE.
Apply Changes
Run
Enter something into the USER VARIABLE field and select something else on the page. Watch the last column update to that value.
Tim.

Similar Messages

  • How to use resource bundle entries for column names/title in .rpt file

    <p>Our application needs to be able to support reporting in multiple languages. Hence we do not want to put language specifiec column names in the rpt file but rather use text for a particular locale during runtime which in java world is easily achievable using Resource Bundle entries.</p><p>Does JRC allow for using resource bundle entries as column names or for that matter for titles etc. in the .rpt file?</p>

    Hi,
       You can follow this step-by-step tutorial to find out how to achieve this using our User Function Libraries (UFLs). The walkthrough can be found here:
    <a href="http://diamond.businessobjects.com/node/412">http://diamond.businessobjects.com/node/412</a>
    Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a>

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

  • How to use variable in :old. variable instead of :old.column name.

    My requirement is to update the audit_update table with the old value and new value when an update statement gets executed. If i use :old.columnname the purpose is getting resolved.
    My requirement is to loop through the columns taken dynamically and update the audit_update_details table. The updation is taking place in a function that called.
    The first cursor holds the column name of a given table.
    I have to use a statement like :old.variablename . where the variable holds the column name .
    Is their an alternative?
    CREATE OR REPLACE TRIGGER INSERT_EMP1
    AFTER INSERT OR UPDATE OR DELETE
    ON EMP FOR EACH ROW
    declare
    v_seq number(5);
    v_result boolean;
    v_col_name varchar2(20);
    CURSOR FIRSTCURSOR IS
    select COLUMN_NAME from user_tab_columns where table_name like 'EMP';
    begin
    if inserting then
    INSERT INTO aud_details VALUES(seq_aud_log_id.nextval,'Emp','I','eno',:NEW.ENO);
    end if;
    if DELETING then
    INSERT INTO aud_details VALUES(seq_aud_log_id.nextval,'Emp','D','eno',:OLD.ENO);
    end if;
    IF UPDATING THEN
    INSERT INTO aud_details VALUES(seq_aud_log_id.nextval,'Emp','U','eno',:OLD.ENO);
    select seq_aud_log_id.currval into v_seq from dual;
    open FIRSTCURSOR;
    LOOP
    FETCH FIRSTCURSOR INTO v_col_name;
    EXIT WHEN FIRSTCURSOR%NOTFOUND;
    BEGIN
    -- How to make the code to work successfully.
    if (:old.v_col_name != :new.v_col_name) then
    v_result := insert_fn('emp',:old.eno, v_col_name , :old.v_col_name, :new.v_col_name, v_seq );
    end if;
    end;
    end loop;
    THe below is an example that uses the column name .Instead of column name i need to use the variable. So that the trigger functions for any given table.
    /* IF (:old.ename != :new.ename) THEN
    v_result := insert_fn('emp',:old.eno, 'ename' , :old.ename, :new.ename, v_seq );
    END IF;
    IF (:old.dno != :new.dno) THEN
    v_result := insert_fn('emp',:old.eno, 'dno' , :old.dno, :new.dno,v_seq );
    END IF;
    IF (:old.salary != :new.salary) THEN
    v_result := insert_fn('emp',:old.eno, 'salary' , :old.salary, :new.salary, v_seq );
    END IF;
    END IF;
    END INSERT_EMP1;
    thanks,
    vinodh

    As Solomon said, it's not possible, but you could write a procedure that would generate the code to do it for each individual column. You could then execute the code generator procedure any time the tables DDL changed in order to update the triggers code.

  • Using select list value as column name in SQL

    Folks,
    Thanks in advance for any help with this
    I have a select list with two values (Instance and Username) created by
    STATIC2:Username;USERNAME,Instance;INSTANCE
    I am trying to pass the value of this (:P2_SELECT) and use it as a column name in a SQL query as below
    select USERNAME,
    INSTANCE
    from table_name
    where :P2_SELECT like '%'||:P2_TEXTSEARCH||'%'
    When I substitue the :P2_SELECT for one of the values (either instance or username) this works fine
    I suspect it is due to how Application Express interprets the value of :P2_SELECT
    Any help would be much appreciated!
    Gareth

    Thanks Munky that worked a treat!
    The next hurdle I have now is that because I have changed the region type to "PL/SQL Function(returning SQL Query)" there is no longer the option to add sorting to the columns as I have had to change the Source option to "Use Generic Column Names (parse query at runtime only)"
    I will have a scout around and see how I can get around this
    Gareth

  • SQL Query not working for column names with spaces

    Hi People..
    We have a strange situation wherein, the column name in the database table has a space inbetween like "Constant Name". While we write a JDBC statement code with the select query we get an exception for invalid syntax. It will help us in a great way if you have anything to inform us on this..
    Thanks
    Prabz

    Using case sensitive names and names with spaces in it is not a good practice.
    However, I believe the SQL standard accounts for this with quoted identifiers. I believe the syntax is
    . select "My Field1", "My Field2"
    . from "My Table'
    Have also seen the following although it might be MS Access specific.
    . select [My Field1], [My Field2]
    . from [My Table]

  • How to swap column values using variable in sql?

    Hi,
    I have a table and i want to swap two column values using variable
    please help me

    Hi,
    Let us assume that the DeptNAME and DeptNo columns are of type VARCHAR2. However, DeptNO column is VARCHAR2(10) and DeptNAMe is VARCHAR2(100).
    First of all DeptNo column needs to be modified to be 100.
    i) ALTER TABLE DEPT MODIFY DEPTNO VARCHAR2(100);
    Secondly, you will swap DEPTNAME and DEPTNO values using the SQL as follows:
    ii) update dept t1
    set deptname = (select deptno from dept2 t2 where t1.deptno = t2.deptno),
    deptno = (select deptname from dept2 t2 where t1.deptno = t2.deptno);
    Now, finally you want the deptname columns to be VARCHAR2(10)
    iii) ALTER TABLE DEPT MODIFY DEPTNAME VARCHAR2(10).
    If DEPTNO is a NUMBER column, you cannot alter the datatype unless the table is empty; in that case the whole swapping requirement would be moot.
    Trinath Somanchi,
    ( http://www.myospages.com )

  • [Swing] JTable & Oracle DB: SQL Query for Column Names Change

    Hello,
    I apologise for the 'stupid' thread subject name.
    Now i have a JTable wich i fill with rows from an Oracle DB.
    The query is something like this: "SELECT location_id, location_name FROM locations*bold*", and in the table i will have the columns names LOCATION_ID & LOCATION_NAME.
    I want to change this query like: "SELECT location_id "Location ID", location_name "Location Name" FROM locations".
    The only problem is that i CAN NOT insert "" inside ""
    So if anyone know how to fix this 'problem' please share that with me.
    Thank you,
    B.

    found it.. \" \"
    :)

  • Dynamic UPDATE statement with parameters for column names.

    Hello,
    On this* website I read "The SQL string can contain placeholders for bind arguments, but bind values cannot be used to pass in the names of schema objects (table or column names). You may pass in numeric, date, and string expressions, but not a BOOLEAN or NULL literal value"
    On the other hand, in this Re: execute immediate with dynamic column name update and many other
    posts people use EXECUTE IMMEDIATE to create a dynamic UPDATE statement.
    dynSQL:='UPDATE CO_STAT2 CO SET CO.'||P_ENT_B_G_NAME||' = '||P_ENT_E_G_WE||'
    WHERE ST IN
    (SELECT ST FROM STG_CO_STAT2_TEST CO WHERE
    '||P_ST||' = CO.ST AND
    CO.'||P_ENT_E_G_NAME||' > '||P_ENT_E_G_WE||' AND
    CO.'||P_ENT_B_G_NAME||' < '||P_ENT_E_G_WE||');';
    EXECUTE IMMEDIATE dynSQL ;
    Since this statement is part of a Stored Procedure, I wont see the exact error but just get a ORA-06512.
    The compiling works fine and I use Oracle 11g.
    http://psoug.org/definition/EXECUTE_IMMEDIATE.htm

    OK I extracted from all of your posts so far that I have to use "bind-variables with :"
    From all the other tuorials and forums posts, I assume using the pipe is correct so I added those as well into the script:
    set serveroutput on format wraped;
    DECLARE
    dynSQL VARCHAR2(5000);
    P_ENT_E_G_NAME VARCHAR2 (100) :='test1'; P_ENT_E_G_WE VARCHAR2 (100) :='01.02.2012'; P_ENT_B_G_NAME VARCHAR2 (100) :='01.01.2012';
    P_ST                VARCHAR2 (100) :='32132';
    BEGIN
    dynSQL:= 'UPDATE CO_STAT2 CO SET CO.'||:P_ENT_B_G_NAME||' = '||:P_ENT_E_G_WE||'
                  WHERE ST IN (SELECT ST FROM STG_CO_STAT2_TEST CO WHERE
                  '||:P_ST||'                           = CO.ST                  AND
                  CO.'||:P_ENT_E_G_NAME||'     > '||:P_ENT_E_G_WE||' AND
                  CO.'||:P_ENT_B_G_NAME||'    
    < '||:P_ENT_E_G_WE||')';
    --this is somehow missing after the last < '||:P_ENT_E_G_WE||')';
    dbms_output.enable;
    dbms_output.put(dynSQL);
    --EXECUTE IMMEDIATE dynSQL;    
    END;Problem:I think I figured it out, the dates that I parse into the query need additional '

  • Need to use Select List value as column name

    I want to have a WHERE ? IS BETWEEN ? AND ? clause.
    I am using the PL/SQL Query returning a SQL Query as a report. This uses bind variables for items I had set on my form..... If I hardcode something like:
    'WHERE STARTDATE IS BETWEEN '||
    'TO_DATE(:P1_START,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:P2_END,''dd-MON-YYYY HH24:MI'')';
    I have no problem, but I have 2 date columns, STARTDATE and ENDDATE, and would like to use the value in a select list and not have to hardcode "STARTDATE" in there. I have not been able to do this, does anyone know how to use a bind variable as a column name? From reading some posts I think it might not be possible.

    Heather,
    You're on the right track, just glue in the column name so that it becomes part of the returned query string from the function (...'WHERE '||:COLNAME||' IS BETWEEN '|| ...).
    Note that the bind variable is not part of the returned query string, but the column name obtained from the bind variable when the function executes does become part of the query string.
    Scott

  • Alias Names for Column names in the Prompt

    Hi,
    I have a scenario where I am taking column names into prompt. I have used the following SQL in the SQL results under "Show" option of the Prompt.
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END FROM " Real Time"
    UNION ALL
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END FROM "Real Time"
    My problem here is I am getting the column names into the Prompt as "Orders"."By OrderDate" and "Orders"."By ShipDate", which is not acceptable and readable format for the user. I tried using the alias name in the SQL query this way.
    SELECT (CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END) AS "By OrderDate" FROM " Real Time"
    UNION ALL
    SELECT (CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END) AS "By ShipDate" FROM "Real Time"
    but it is throwing an error.Is there any way that I can assign an alias name for the column names such as OrderDate and ShipDate in the above SQL.
    Your quick respose is appreciated.
    Thanks,
    Rama

    Change ur
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END FROM " Real Time"
    UNION ALL
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END FROM "Real Time"
    To
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE By OrderDate END FROM " Real Time"
    UNION ALL
    SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE By ShipDate END FROM "Real Time"
    So that it displays the Name as required
    Then in the Fx for that column in the Report Use '"Orders"."@Presentation variable"'.
    This worked for me Let me know if it worked for you.

  • Using variables in SQL Plus Worksheet

    I'm new to Oracle. I've developed in MS SQL for some time. I'm trying to debug a query we're using in an application. I paste it into SQL Plus Worksheet and get the message:
    SP2-0552: Bind variable "COUNTYPK" not declared.
    I could paste in a value, but I would like to define a variable before the query so that it will work the same way as it would in production.
    SELECT rsiplate.OWNER.work_area_code || '-' || SUBSTR(rsiplate.OWNER.work_phone_number, 1, 3) || '-' || SUBSTR(rsiplate.OWNER.work_phone_number, 4, 4) AS BUSINESSPHONE, trim(rsiplate.OWNER.first_name||' '||rsiplate.OWNER.middle_name||' '||rsiplate.OWNER.last_name) AS BUSINESSNAME, rsiplate.ADDRESS.address_line1 AS ADDRESSLINE1, rsiplate.ADDRESS.address_line2 AS ADDRESSLINE2, rsiplate.ADDRESS.city_name AS CITY, rsiplate.ADDRESS.state_code AS STATE, SUBSTR(rsiplate.ADDRESS.zip_code, 1, 5) AS POSTALCODE FROM rsiplate.WATERCRAFT_MASTER, rsiplate.WATERCRAFT_CURRENT, rsiplate.WATERCRAFT_REGIST_CURRENT, rsiplate.OWNER, rsiplate.WATERCRAFT_OWNER_CURRENT, rsiplate.ADDRESS WHERE rsiplate.WATERCRAFT_MASTER.WATERCRAFT_ID = rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_ID AND rsiplate.WATERCRAFT_MASTER.LF_WATERCRAFT_REGIST_ORDER = rsiplate.WATERCRAFT_REGIST_CURRENT.WATERCRAFT_REGIST_ORDER AND rsiplate.WATERCRAFT_MASTER.LF_WATERCRAFT_ORDER = rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_ORDER AND rsiplate.WATERCRAFT_MASTER.watercraft_id = rsiplate.WATERCRAFT_REGIST_CURRENT.watercraft_id and rsiplate.WATERCRAFT_MASTER.watercraft_id = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_id and rsiplate.WATERCRAFT_OWNER_CURRENT.owner_id = rsiplate.OWNER.owner_id and rsiplate.WATERCRAFT_MASTER.watercraft_owner_group = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_group and rsiplate.ADDRESS.address_set_id = rsiplate.OWNER.address_set_id and rsiplate.WATERCRAFT_MASTER.data_status_code = 1 and rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_order = 1 and rsiplate.WATERCRAFT_REGIST_CURRENT.REGIST_EXPIRATION_DATE >= SYSDATE AND rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_USE_CODE = 3 AND rsiplate.ADDRESS.COUNTY_NUMBER = :CountyPK GROUP BY rsiplate.OWNER.work_area_code, rsiplate.OWNER.work_phone_number, rsiplate.OWNER.first_name, rsiplate.OWNER.middle_name, rsiplate.OWNER.last_name, rsiplate.ADDRESS.address_line1, rsiplate.ADDRESS.address_line2, rsiplate.ADDRESS.city_name, rsiplate.ADDRESS.state_code, rsiplate.ADDRESS.zip_code;

    Okay, I made some adjustements:
    SET DEFINE :
    DEFINE :COUNTYPK = '01'
    SELECT rsiplate.OWNER.work_area_code||'-'||SUBSTR(rsiplate.OWNER.work_phone_number, 1, 3)||'-'||SUBSTR(rsiplate.OWNER.work_phone_number, 4, 4) AS BUSINESSPHONE, trim(rsiplate.OWNER.first_name||' '||rsiplate.OWNER.middle_name||' '||rsiplate.OWNER.last_name) AS BUSINESSNAME, rsiplate.ADDRESS.address_line1 AS ADDRESSLINE1, rsiplate.ADDRESS.address_line2 AS ADDRESSLINE2, rsiplate.ADDRESS.city_name AS CITY, rsiplate.ADDRESS.state_code AS STATE, SUBSTR(rsiplate.ADDRESS.zip_code, 1, 5) AS POSTALCODE FROM rsiplate.WATERCRAFT_MASTER, rsiplate.WATERCRAFT_CURRENT, rsiplate.WATERCRAFT_REGIST_CURRENT, rsiplate.OWNER, rsiplate.WATERCRAFT_OWNER_CURRENT, rsiplate.ADDRESS WHERE rsiplate.WATERCRAFT_MASTER.WATERCRAFT_ID = rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_ID AND rsiplate.WATERCRAFT_MASTER.LF_WATERCRAFT_REGIST_ORDER = rsiplate.WATERCRAFT_REGIST_CURRENT.WATERCRAFT_REGIST_ORDER AND rsiplate.WATERCRAFT_MASTER.LF_WATERCRAFT_ORDER = rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_ORDER AND rsiplate.WATERCRAFT_MASTER.watercraft_id = rsiplate.WATERCRAFT_REGIST_CURRENT.watercraft_id and rsiplate.WATERCRAFT_MASTER.watercraft_id = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_id and rsiplate.WATERCRAFT_OWNER_CURRENT.owner_id = rsiplate.OWNER.owner_id and rsiplate.WATERCRAFT_MASTER.watercraft_owner_group = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_group and rsiplate.ADDRESS.address_set_id = rsiplate.OWNER.address_set_id and rsiplate.WATERCRAFT_MASTER.data_status_code = 1 and rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_order = 1 and rsiplate.WATERCRAFT_REGIST_CURRENT.REGIST_EXPIRATION_DATE >= SYSDATE AND rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_USE_CODE = 3 AND rsiplate.ADDRESS.COUNTY_NUMBER = :CountyPK GROUP BY rsiplate.OWNER.work_area_code, rsiplate.OWNER.work_phone_number, rsiplate.OWNER.first_name, rsiplate.OWNER.middle_name, rsiplate.OWNER.last_name, rsiplate.ADDRESS.address_line1, rsiplate.ADDRESS.address_line2, rsiplate.ADDRESS.city_name, rsiplate.ADDRESS.state_code, rsiplate.ADDRESS.zip_code;
    But I still get this:
    SP2-0317: expected symbol name is missing
    old 2: iplate.WATERCRAFT_REGIST_CURRENT.watercraft_id and rsiplate.WATERCRAFT_MASTER.watercraft_id = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_id and rsiplate.WATERCRAFT_OWNER_CURRENT.owner_id = rsiplate.OWNER.owner_id and rsiplate.WATERCRAFT_MASTER.watercraft_owner_group = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_group and rsiplate.ADDRESS.address_set_id = rsiplate.OWNER.address_set_id and rsiplate.WATERCRAFT_MASTER.data_status_code = 1 and rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_order = 1 and rsiplate.WATERCRAFT_REGIST_CURRENT.REGIST_EXPIRATION_DATE >= SYSDATE AND rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_USE_CODE = 3 AND rsiplate.ADDRESS.COUNTY_NUMBER = :CountyPK GROUP BY rsiplate.OWNER.work_area_code, rsiplate.OWNER.work_phone_number, rsiplate.OWNER.first_name, rsiplate.OWNER.middle_name, rsiplate.OWNER.last_name, rsiplate.ADDRESS.address_line1, rsiplate.ADDRESS.address_line2, rsiplate.ADDRESS.city_name, rsiplate.ADDRESS.state_code, rsiplate.ADDRESS.zip_code
    new 2: iplate.WATERCRAFT_REGIST_CURRENT.watercraft_id and rsiplate.WATERCRAFT_MASTER.watercraft_id = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_id and rsiplate.WATERCRAFT_OWNER_CURRENT.owner_id = rsiplate.OWNER.owner_id and rsiplate.WATERCRAFT_MASTER.watercraft_owner_group = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_group and rsiplate.ADDRESS.address_set_id = rsiplate.OWNER.address_set_id and rsiplate.WATERCRAFT_MASTER.data_status_code = 1 and rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_order = 1 and rsiplate.WATERCRAFT_REGIST_CURRENT.REGIST_EXPIRATION_DATE >= SYSDATE AND rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_USE_CODE = 3 AND rsiplate.ADDRESS.COUNTY_NUMBER = 01 GROUP BY rsiplate.OWNER.work_area_code, rsiplate.OWNER.work_phone_number, rsiplate.OWNER.first_name, rsiplate.OWNER.middle_name, rsiplate.OWNER.last_name, rsiplate.ADDRESS.address_line1, rsiplate.ADDRESS.address_line2, rsiplate.ADDRESS.city_name, rsiplate.ADDRESS.state_code, rsiplate.ADDRESS.zip_code
    iplate.WATERCRAFT_REGIST_CURRENT.watercraft_id and rsiplate.WATERCRAFT_MASTER.watercraft_id = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_id and rsiplate.WATERCRAFT_OWNER_CURRENT.owner_id = rsiplate.OWNER.owner_id and rsiplate.WATERCRAFT_MASTER.watercraft_owner_group = rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_group and rsiplate.ADDRESS.address_set_id = rsiplate.OWNER.address_set_id and rsiplate.WATERCRAFT_MASTER.data_status_code = 1 and rsiplate.WATERCRAFT_OWNER_CURRENT.watercraft_owner_order = 1 and rsiplate.WATERCRAFT_REGIST_CURRENT.REGIST_EXPIRATION_DATE >= SYSDATE AND rsiplate.WATERCRAFT_CURRENT.WATERCRAFT_USE_CODE = 3 AND rsiplate.ADDRESS.COUNTY_NUMBER = 01 GROUP BY rsiplate.OWNER.work_area_code, rsiplate.OWNER.work_phone_number, rsiplate.OWNER.first_name, rsiplate.OWNER.middle_name, rsiplate.OWNER.last_name, rsiplate.ADDRESS.address_line1, rsiplate.ADDRESS.address_line2, rsiplate.ADDRESS.city_name, rsiplate.ADDRESS.state_code, rsiplate.ADDRESS.zip_code
    ERROR at line 2:
    ORA-00933: SQL command not properly ended

  • Using Variable in place of property name in set_item_property procedure.

    Hello,
    I need to change the item properties dynamically by using variables for both properties names and their values.But during compilation its showing me error "Too many declrations".Kindly suggest me any best way.

    You already have the answer to that one in the posting above.
    Your table would presumable include rows HEIGHT, WIDTH etc.. as text columns
    So you'd cross reference as above.
    Alternatively you could find out what the numerical values are for HEIGHT (1509) and WIDTH (1508) are and store them in your master table alongside the description that your user will see. Then you can simply do the set_item_property.
    This relies heavily on Oracle not changing the values for these constants. Even if they did you would just have to change your table. Then your solution is generic and future proof.
    Built in for all properties: Not that I know of. But you could sort of use your table as above to help. Simply loop through the constants, do a get_item_property, and show that to the user.
    You'll have to be careful about maybe classifying the things in your table to ensure you don't try to get an inappropriate property for the type of item.
    With a little effort this will all definitely be possible.
    I saw a thread the other day where someone had created a form called "props.fmb" which showed the item properties in a tree style. See if you can find that. This was fairly hard coded compared to what you want, but it would be pretty good as a basis.

  • Sql Transposing Column Name in Row

    i am using Sql Server 2008
    tbl_EmployeeProfile
    EmployeeId EmployeeName LeaveApplicable Active
    1 Sam true true
    2 Rahul false false
    3 Sameer true true
    tbl_MasterLeave
    id LeaveCode Description active
    1 PL Paid Leave true
    2 CL Casual Leave true
    3 SL Sick Leave false
    tble_LeaveAllocation
    EmployeeId Period 1 2 3 .........31
    1 2014 18 4
    3 2014 20 4
    note: tble_Masterleave.id = tble_LeaveAllocation.1( column Name)
    i.e  value of tbl_masterleave id is mape with column name of tble_LeaveAllocation 1,2,.....31
    Expected out put
    EmployeeId EmployeeeName Period PL CL
    1 Sam 2014 18 4
    3 Sameer 2014 20 4
    Note: show only record who is active = true & leaveApplicable = true  .
    why i made this table structure  because non of organization leave type are not fixed, so user can customize leave according their requirment , so i made tbl_ allocation table with 1 to 31 column , so user can allocate leave type max 31.
    please advice me is it right method or any other good alternative solution 
    Thanks Best Regard Naweez

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    Why are you so special that you do not have to post DDL? I Googled you and got nothing that would grant you privilege. 
    You have the manners of a pig and your code is garbage. Look up tibbling in the “code smells” paper. That is what we call your “tbl-”
     prefix when we laugh at you. 
    Why do you write SQL with assembly language flags? SQL programmers do not! Why did you use the term “master_” on a table name? This term is from tape files and network DB; it has nothing to do with RDBMS!! 
    Why do you think that “active” is an attribute? NO! It is a value of some particular attribute and needs a temporal range. 
    There is no generic “id” in RDBMS! Remember the Law of Identity from your first freshman logic class? Rows are not records, so you got that term wrong. We do not use mappings in RDBMS; we have REFERENCES. 
    CREATE TABLE Personnel
    (emp_id CHAR(10) NOT NULL PRIMARY KEY,
     emp_name VARCHAR(35) NOT NULL);
    CREATE TABLE Leave_Codes
    (leave_code CHAR(2) NOT NULL PRIMARY KEY,
     leave_code_description VARCHAR (20) NOT NULL);
    INSERT INTO Leave_Codes
    VALUES 
    ('PL', 'Paid Leave'),
    ('CL', 'Casual Leave'),
    ('SL', 'Sick Leave);
    I might have done this: 
    CREATE TABLE Employee_Leaves
    (emp_id CHAR(10) NOT NULL
     REFERENCES Personnel(emp_id)
     leave_start_date DATE NOT NULL,
     leave_end_date DATE NOT NULL,
    CHECK(leave_start_date < leave_end_date),
     leave_code CHAR(2) NOT NULL
      REFERENCES Leave_Codes (leave_code),
     PRIMARY KEY (??),
     >> why I made this table structure because our organization leave type are not fixed, so user can customize leave according their requirement, so I made allocation table with 1 to 31 column, so user can allocate leave type max 31. <<
    No, you did this out of ignorance. You do not understand RDBMS or SQL.  YHou do not know any of the basics. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to use Variable in interface for Mapping in ODI 11g

    Hi,
    I want to use Variable 'Year' in interface mapping. how i can do that? I define a variable YEAR1 = '2001' and in interface i put #YEAR1 but it didn't work for me. is there any other way?
    Example.
    I m using 'Year' column in mapping and it is having different 3 constant values so i was think to define 3 variable Year1= '2001' & Year2= '2005' & Year3= '2010'.
    In interface i just want to put variable name insted giving fix value.
    regards
    Sher

    Thank u
    I m trying with all the options & when i create Variable i and set Default value to ''2001'
    '#YEAR'
    #YEAR
    '#PROJECT_NAME.YEAR'
    #PROJECT_NAM.YEAR
    #PROJECT_NAME.'YEAR'
    and setting to Stagging Area
    But still it is not working out.
    I m suing ODI11.1.1.3
    is it any issue?

Maybe you are looking for

  • Free Lion update not showing in purchases in App store.

    Hi I have just bought a new I mac. I want the Lion update so went to the up to date program page and entered in the information required. Lion sucessfully purchased although is not showing in the purchases tab of the app store. I have checked my orde

  • Creating database on OMF

    Hello Experts I am working on Oracle 10g Enterprise Edition Release 10.2.0.1.0 on Windows 2000 Creating an OMF database with the folllowing procedure: # Copyright (c) 1991, 2001, 2002 by Oracle Corporation # Cache and I/O db_block_size=8192 db_file_m

  • Why does replace component change refdes

    Why does MS change the refdes of a part when the replace component command is used? Here is an example. Say I have a schematic that has R1-R20 on it.  All parts are from the User DB and have part number, vendor info, etc.    Later I decided to remove

  • White or Blank Screen Randomly Throughout Modules

    Good Afternoon, We have an ongoing issue with white screens in captivate that appear randomly throughout testing once we load the training to our website.  See Screenshot: http://euniversity.palmettohealth.org/whitespace/ The files are loaded to our

  • Why itunes for windows is not working and downloads have errors

    Hi, few days ago I download the actualization of itunes and from that day I can syncrnonize because itunes cant open because an error