Generate an increment of one value????

Hello guys,
I wanna generate ID value as an auto increment of 1, so shall I go for sequence or function or any other thing??? Which will be best????
Other than the auto increment of this ID column(which is primary key column into DB) I wanna keep a standard prefix to all of the values, something like (student1, student2, student3, student4, .................................etc) hence 1,2,3,4...... are auto incremented values and wanna keep prefix to all the values as "student".
How should I do that?????
Help will be appreciated...
regards,
Kumar

hi Roel,
Thanks for replying, I'm adding some prefix to distinguish different ID values(like schoolID, teacherID, studentID)...
Yes their is a req. from the client, to add prefix according to its value(student ID column shuld be with data as student1, student2, .... etc) and same like that for schoolID & teacherID.
Also, all these values are in different tables with 1-Many relationship.... (like 1 school has many teachers and each teacher handle many students)
I am aware of the auto increment by trigger & sequence... its something like this :-
CREATE OR REPLACE TRIGGER "STUDENT_TRIGGER"
BEFORE
insert on "STUDENT_INFORMATION"
for each row
begin
select student_information_seq.nextval into:new.S_id from dual;
end;
alter sequence "STUDENT_INFORMATION_SEQ"
minvalue 1
maxvalue 99999999999999999999999999
increment by 1
nocycle
nocache
noorder
But I don't know how to add prefix with the auto incremented value, can you help me out.... with a good link or good example in my apex workspace ... appreciated once again Roel for replying me...
regards,
Kumar

Similar Messages

  • Generate Multiple Invoices in One PDF

    Hi,
    I have requirement whereby I need to generate multiple invoices in one PDF file. I am using Oracle BI Publisher with Oracle APEX 4.0.2
    If there is only one invoice that needs to be generated in one PDF file then I already have the solution whereby I print the APEX page item session state values on Invoice Header and get the invoice line items from a SQL Query in my RTF template.
    However how to the do the same when multiple invoice needs to be generated in one single PDF file ?
    Any pointers will highly appreciated.
    Thanks & Regards,
    Ashish

    asagarwal wrote:
    However how to the do the same when multiple invoice needs to be generated in one single PDF file ?It should be pretty straight forward.
    Once you've got the query returning multiple rows, then just add a repeating group to your report (if an existing report, just select the section of the document that will repeat -> add-ins menu -> insert repeating group...; or right click selection -> BI Publisher -> Create group...), wherein the column values exist. You can even specify a page break at the end.
    By the way, this question is probably more suited for the {forum:id=245} forum.
    Ta,
    Trent

  • Generating multiple rows from one physical row

    I was wondering if anyone has done or knows how to generate multiple rows for one physical row. In my query "SELECT Cust_No, Amount from Balances" if the amount is > 99,999.99 I want 2 rows returned, one with an amount of 90,000.00 and the other with an amount of 9,999.99. I'm thinking I need to use a view or function to return a result set but I'm not sure how.
    Thanks in advance,
    Allen Davis
    [email protected]

    James,
    Well your right in that you need a function, but also 3 views to accomplish that. I just wrote up the sql below and tested it. Basically you want the first view to return all records less than your cap of 99,999, thoes that exceed that will always return as 90,000 (see example on record PK 774177177). The second view returns money that remains AFTER the cap (in your case 9,999). The second view though also has to excude the ones less than the CAP.
    DATA and TABLE layout
    1) Table is called T1, columns are PK : primary key value, and N2 : some number column holding the MONEY amount
    2) data is below fromtable called t1 (10 records) ...
    select pk,n2 from t1 order by pk
    PK     N2
    117165529     100
    274000876     200000
    350682010     9999
    737652242     90000
    774177177     99999
    1369893126     1000
    1663704428     100000
    1720465556     8888
    1793125955     0
    1972069382     1000000
    Now see the records with money at 99,999 (just like in your example). You want 2 records, so the VIEWS now come into play. The view itself CALLS the function, this occurs when you select from the view. The function will either return 90,000 (your defined cap) or the remained after subtracting the money from 90,000. The 3 views are defined below (the FUNCTION which is shown after will have to be compiled first) ...
    --[VIEWS START]
    CREATE OR REPLACE VIEW VIEW1
    (PK,SHOW_MONEY)
    AS SELECT PK,FN_TRIM_MONEY(N2,1) FROM T1;
    CREATE OR REPLACE VIEW VIEW2
    (PK,SHOW_MONEY)
    AS SELECT PK,FN_TRIM_MONEY(N2,2) FROM T1 WHERE N2 >= 99999;
    CREATE OR REPLACE VIEW VIEW_ALL
    (PK,SHOW_MONEY)
    AS
    SELECT * FROM VIEW1
    UNION ALL
    SELECT * FROM VIEW2;
    --[VIEWS END]
    OK now for the actual function ...
    --[FUNCTION START]
    CREATE OR REPLACE FUNCTION
    FN_TRIM_MONEY
    PI_MONEY NUMBER,
    PI_VIEW_ID NUMBER
    RETURN NUMBER AS
    LS_TEMP VARCHAR2(2000);
    LI_TEMP NUMBER;
    LD_TEMP DATE;
    LI_CON_MONEY_MAX CONSTANT NUMBER := 90000;
    LS_RETURN VARCHAR2(2000);
    BEGIN
    IF (PI_MONEY > LI_CON_MONEY_MAX) THEN
    IF PI_VIEW_ID = 1 THEN
    LI_TEMP := LI_CON_MONEY_MAX;
    ELSIF PI_VIEW_ID = 2 THEN
    LI_TEMP := (PI_MONEY - LI_CON_MONEY_MAX);
    END IF;
    ELSE
    LI_TEMP := PI_MONEY;
    END IF;
    IF LI_TEMP < 0 THEN
    LI_TEMP := 0;
    END IF;
    LS_RETURN := LI_TEMP;
    RETURN LS_RETURN;
    END;
    SHOW ERRORS;
    --[FUNCTION END]
    I compiled the function and views with no errors. This is what I get when I query the 3 views ...
    --[VIEW 1]
    PK     SHOW_MONEY
    117165529     100
    274000876     90000
    350682010     9999
    737652242     90000
    774177177     90000
    1369893126     1000
    1663704428     90000
    1720465556     8888
    1793125955     0
    1972069382     90000
    --[VIEW 2]
    PK     SHOW_MONEY
    274000876     110000
    774177177     9999
    1663704428     10000
    1972069382     910000
    --[VIEW ALL]
    PK     SHOW_MONEY
    117165529     100
    274000876     90000
    274000876     110000
    350682010     9999
    737652242     90000
    774177177     90000
    774177177     9999
    1369893126     1000
    1663704428     90000
    1663704428     10000
    1720465556     8888
    1793125955     0
    1972069382     90000
    1972069382     910000
    So notice the PK entry 774177177 listed twice, once with 90,000 and other with 9,999. Also notice we now have 14 records from the original 10, meaning 4 records qualified for the split (all data from VIEW 2).
    This is why Oracle kicks ass, views and functions are very powerful when used together and can return pretty much anything.
    Thanks,
    Tyler D.
    [email protected]

  • PI Mapping : Generating multiple nodes by one node

    Hi,
    I'm looking for the solution how to generate two nodes by one node in source messages.  In the following sample messages, two nodes in source are expected to generate 4 nodes in output.
    Source Structure
    <item>
         <id>
         <name>
    </item>
    Target structure
    <article>
         <flag>
         <id>
         <name>
    </article>
    Source message instance
    <item>
         <id>1</id>
         <name>ABC</name>
    </item>
    <item>
         <id>2</id>
         <name>XYZ</name>
    </item>
    Expected output message
    <article>
         <flag>QD</flag>
         <id>1</id>
         <name>ABC</name>
    </article>
    <article>
         <flag>QI</flag>
         <id>1</id>
         <name>ABC</name>
    </article>
    <article>
         <flag>QD</flag>
         <id>2</id>
         <name>XYZ</name>
    </article>
    <article>
         <flag>QI</flag>
         <id>2</id>
         <name>XYZ</name>
    </article>
    In output message, two node of article 1 should be together.
    Thanks in advance!
    Victor

    Hey thanks to  all that contributed to the solution of this.
    I'm a newby to message mapping of SAP PI.
    But in my learning process I found out that the solution proposed in :
    http://help.sap.com/saphelp_nw04/helpdata/en/26/d22366565be0449d7b3cc26b1bab10/content.htm
    using the copyvalue function
    is not working for the case where you have 2 partnernodes in the partnermsg. In this case the proposed solution is putting the street,city and zipcode of the first partnernode in both the targetnodes created in the mapping.
    After some thinking about how to solve it I came up with the solution :
    I created 3 UDF's  ( getstreet ,getcity and getzipcode) :
    public void getstreet(String[] var1, ResultList result, Container container) throws StreamTransformationException{
    for (int i = 0; i <  var1.length; i++) {
    if ( (i%3)  == 0) {
       result.addValue(var1<i>);
    public void getcity(String[] var1, ResultList result, Container container) throws StreamTransformationException{
    for (int i = 0; i <  var1.length; i++) {
    if ( (i%3)  == 1) {
       result.addValue(var1<i>);
    public void getzipcode(String[] var1, ResultList result, Container container) throws StreamTransformationException{
    for (int i = 0; i <  var1.length; i++) {
    if ( (i%3)  == 2) {
       result.addValue(var1<i>);
    the mapping for the target field street :
    street = splitbyvalue ( getstreet(removecontext(addrdat))    "each value")
    similar mappings need to be set for city and zipcode.
    other mappings are :
    customermsg = partnermsg
    customer = createif(exists(partner)))
    name = name
    this solves the issue for the 2 partnernodes without using the copyvalue function

  • Generate change documents for characteristic value changes in material master

    Hello,
    I am currently using material class (class type: 001) and assign some characteristics to material master. I am going to create a query/custom report to track all changes in the characteristic values in that material master. However, I could not find any change document in CDHDR table.
    I have activated "Change Docs" parameter in class type 001 customizing as described in SAP note: 65124 Classification Change Documents as follow:
    Is it possible to generate change documents for characteristic values in material master?
    Regards,
    Julian

    Hi Rajen,
    Thanks for your reply. It seems that I missed one more step in the customizing. Once the multiple object is activated, I need to activate the change document parameter for each assigned object.
    Thread closed.
    Regards,
    Julian

  • Percentage pie chart whose query return just one value

    Hi,
    I have a requirement which is to display a pie chart that shows the relative percentage of based on a particular row's values.
    Here the SQL query return just one value to generate the chart, however Apex is creating its own seemingly random value to draw the rest of the chart and dividing the region.
    Is there any way for Apex to take the single value that the query returns as a percentage and generate the chart by calculating the other value to be as (100 - queried value) and split the region in the chart accordingly.
    Of course one method is to store both the value that the query returns as well as 100 - that value in a table and then write the query in the chart that references both these values.. but I'd like to know if there is a way to go about it without storing this extra bit of information in a table
    Thanks!

    you create a hidden page item and populate with total value and percentile calculated value and use it in dial chart as querry.

  • XML tag with attributes and one value via XSU

    I need to generate a XML structure with attributes in the opening tag, and just one value in the body, like this:
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">9.99</PRODUCT-LIST-PRICE>
    Without an object type, I can just create tags like this
    XML3
    <PRODUCT-LIST-PRICE>9.99</PRODUCT-LIST-PRICE>
    (with no attributes, but a single value) via the followig statement
    SELECT sys_xmlgen ('9.99',
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML3"
    FROM DUAL;
    Having an object "productlisteprice_type", defined by
    CREATE OR REPLACE TYPE productlisteprice_type AS OBJECT
    "@NET-PRICE" VARCHAR2(10),
    "@CURRENCY" VARCHAR2(10),
    "PRICE" VARCHAR2(20)
    I just get XML like this
    XML2
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">
    <PRICE>9.99</PRICE>
    </PRODUCT-LIST-PRICE>
    (with attributes, but no direct value beneath the "PRODUCT-LIST-PRICE" tag) via the following statement
    SELECT sys_xmlgen ( productlisteprice_type(0,'USD','9.99'),
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML2"
    FROM DUAL;
    Not what I need :-(
    Are there any possibilities in XSU to get the needed XML code? Or do I have to do some post-production via XSQL???
    Another question: Is it possible to use specific keywords like "online" as XML tagnames, via objects? The objects don't allow "online" as a field name...
    Thanks in advance,
    Holger

    I need to generate a XML structure with attributes in the opening tag, and just one value in the body, like this:
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">9.99</PRODUCT-LIST-PRICE>
    Without an object type, I can just create tags like this
    XML3
    <PRODUCT-LIST-PRICE>9.99</PRODUCT-LIST-PRICE>
    (with no attributes, but a single value) via the followig statement
    SELECT sys_xmlgen ('9.99',
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML3"
    FROM DUAL;
    Having an object "productlisteprice_type", defined by
    CREATE OR REPLACE TYPE productlisteprice_type AS OBJECT
    "@NET-PRICE" VARCHAR2(10),
    "@CURRENCY" VARCHAR2(10),
    "PRICE" VARCHAR2(20)
    I just get XML like this
    XML2
    <PRODUCT-LIST-PRICE NET-PRICE="0" CURRENCY="USD">
    <PRICE>9.99</PRICE>
    </PRODUCT-LIST-PRICE>
    (with attributes, but no direct value beneath the "PRODUCT-LIST-PRICE" tag) via the following statement
    SELECT sys_xmlgen ( productlisteprice_type(0,'USD','9.99'),
    sys.xmlgenformattype.createFormat('PRODUCT-LIST-PRICE')
    ).getClobVal() "XML2"
    FROM DUAL;
    Not what I need :-(
    Are there any possibilities in XSU to get the needed XML code? Or do I have to do some post-production via XSQL???
    Another question: Is it possible to use specific keywords like "online" as XML tagnames, via objects? The objects don't allow "online" as a field name...
    Thanks in advance,
    Holger

  • Subquery returned more than one value

    Hi,
    I have this statement which has been working fine - not I get a 'Subquery returned more than one value" error:
    SELECT
    'WAS3' AS 'Rec ID',
    E.EecEEID AS 'Emp ID',
    eepNameFirst AS 'First Name',
    eepNameLast AS 'Last Name',
    EecDateOfOriginalHire AS 'Service Date',
    (SELECT DATEDIFF(YEAR, EecDateOfOriginalHire, getdate()) from empcomp EC WHERE EC.EecEEID = E.EECEEID) as 'Yrs of Serv'
    FROM
    EmpPers
    JOIN EmpComp E
    ON E.eecEEID = eepEEID
    JOIN Company
    ON eecCoID = cmpCoID
    WHERE
    EecDateOfTermination IS NOT NULL
    AND EXISTS
    (SELECT 1
    FROM EmpComp e2
    WHERE e2.EecEEID = E.EecEEID
    --AND e2.eecEmplStatus <> 'A')-- changed to <> ...this WAS/is to filter out anyone that was termed then re-hired
    --AND E.EecTermReason NOT IN ('I01','I02','I03','I14','I22','V05','V07','V09','V12','V22','V13', 'TRO')
    AND E.eecDateOfTermination
    IN (SELECT (EC.eecDateOfTermination)
    FROM EMPCOMP EC
    WHERE EC.EecEEID = E.EECEEID
    AND EC.eecDateOfTermination IS NOT NULL
    AND eC.eecDateOfTermination >= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0)
    AND EC.eecDateOfTermination <=DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6)
    AND e.eecDateOfTermination >= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0)
    AND E.eecDateOfTermination <= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6)))
    --AND eC.eecDateOfTermination >= DATEADD(wk,DATEDIFF(wk,0,('12/30/2007')),0)
    -- AND EC.eecDateOfTermination <=DATEADD(wk,DATEDIFF(wk,0,('12/30/2007')),6)
    -- AND e.eecDateOfTermination >= DATEADD(wk,DATEDIFF(wk,0,('12/30/2007')),0)
    -- AND E.eecDateOfTermination <= DATEADD(wk,DATEDIFF(wk,0,('12/30/2007')),6)
    -- AND E.eecDateOfTermination IS NOT NULL ))
    --added below per Paul Cottle to exclude employeess less than four years
    AND E.eecdateoforiginalhire >=dateadd(year,-4, CURRENT_TIMESTAMP)
    qeqw

    Check this, if it works:
    SELECT
    'WAS3' AS 'Rec ID',
    E.EecEEID AS 'Emp ID',
    eepNameFirst AS 'First Name',
    eepNameLast AS 'Last Name',
    EecDateOfOriginalHire AS 'Service Date',
    DATEDIFF(YEAR, EecDateOfOriginalHire, getdate()) as 'Yrs of Serv'
    FROM EmpPers
    JOIN EmpComp E ON E.eecEEID = eepEEID
    JOIN Company ON eecCoID = cmpCoID
    WHERE EecDateOfTermination IS NOT NULL
    AND EXISTS
    (SELECT 1
    FROM EmpComp e2
    WHERE e2.EecEEID = E.EecEEID
    AND E.eecDateOfTermination
    IN (SELECT (EC.eecDateOfTermination)
    FROM EMPCOMP EC
    WHERE EC.EecEEID = E.EECEEID
    AND EC.eecDateOfTermination IS NOT NULL
    AND eC.eecDateOfTermination >= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0)
    AND EC.eecDateOfTermination <=DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6)
    AND e.eecDateOfTermination >= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0)
    AND E.eecDateOfTermination <= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),6)))
    AND E.eecdateoforiginalhire >=dateadd(year,-4, CURRENT_TIMESTAMP)
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • How to get one value from multiple duplication for a key figure field

    Hi expert,
          I have a infoprovider, with following format:
            employee     hourly_rate   action_type  count of action
         there are multiple rows for each employee, I want to create query as follows:
            employee     hourly_rate   action_type  count of action
         in which hourly_rate is constant , only retriving one value from multiple rows for one employee, count of action should be summarized. 
    how to get this hourly_rate.
    Many Thanks,

    Hi,
    put the employee in rows panel -> reaming object put it in free char panel.
    suppress the all result rows for the all object except employee .
    select the object -> go to query properties -> select display tab -> select result rows -> select suppress.
    select the employee -> go to query properties -> select display tab -> select result rows -> select always display. - now it will give employee wise hourly rate summarize data.
    Thanks,
    Phani.

  • Request.getParameter("checkbox") Returns only one value

    Hello Friends,
    I have a very urgent problem on live site. I moved my project from jrun2.3.3 to Jrun 3.1 and I was using multiple select and checkboxes.
    With Jrun3.1 if you select multiple select or multiple checkboxes it returns only one value instead of all the values.
    Any help is hightly appreciated.

    If multiple checkboxes have the same name, when selected and submitted, it will pass all values. But you will need to access those using getParameterValues("checkboxname") not getParameter("checkboxname"). The same goes for select elements.
    Perhaps it was a bug in JRun 2.3.3 that allowed you to reference all parameter values using just the getParameter("xxx") method.

  • How can I display more than one value in Calendar ?

    Hi,
    the standard (example) script allows for the display of one value only (as I understood). How can I display two or three values, from the very same table ? Students of mine during an HTMLDB workshop in Leipzig did ask that question.
    Do we have a more detailed docum. on the use of the calendar ?
    pls kindly advise. TIA.
    Bernhard

    my solution:
    Source fo the calendar starts:
    snip>
    declare
    q varchar(32767) := null;
    begin
    q := 'select "ETA", <--- Date Field and concatination of fields as follows:
    "SCHIFFSNAME"|| "ETA_TIME"|| "TERMINAL"||''(br*)'',
    null,
    null,
    null,
    null
    from "#OWNER#"."SCHEDULE"'; . . . . . . .
    snip>
    comment on (br*) - you have to use "<" and ">" instead of "( " and ")" to have the "break/new line effect"
    brgds
    Bernhard

  • Select more than one value at a time from an LOV?

    Is it possible to configure an LOV-based text field so more than one value at a time can be chosen from the drop-down LOV list? This is a user requirement for specifying multiple values in an SQL WHERE clause.

    Rather several select fields because single returned value is a functional limitation of <select>.

  • How can i pass the one value for two bind parameters

    hi All,
    i have a search Query
    select Distinct CONSOLIDATION_SUMMARY_ID,CREATION_DATE,CREATED_BY,BATCH_ID,PROCESS_FLAG,ERROR_MESSAGE,CUSTOMER_ID,BILLING_FREQUENCY
    ,CONSOLIDATION_LEVEL,SOLD_TO_ORG_ID ,SHIP_TO_ORG_ID ,TRANSACTIONAL_CURR_CODE ,INVOICE_TO_ORG_ID ,PRICE_LIST_ID
    ,ORIG_SYS_DOCUMENT_REF,INVENTORY_ITEM_ID ,ORGANIZATION_ID ,ORDERED_ITEM ,ORDERED_QUANTITY ,UNIT_LIST_PRICE
    ,UNIT_SEELING_PRICE,ORDER_QUANTITY_UOM,ORDER_NUMBER ,ORDER_DATE ,INVOICE_NUMBER ,INVOICE_DATE
    ,FEE_CALCULATION_WORKSHEET_PDF ,TRADE_DETAILS_PDF ,INVOICE_REPORT_PDF ,PRICING_ATTRIBUTE_CONTEXT
    ,PRICING_ATTRIBUTE ,PRICING_ATTR_VALUE_FROM
    from xxcurrnx.xxcur_trade_consol_summary XXSTR
    WHERE XXSTR.BATCH_ID=NVL(:1,XXSTR.BATCH_ID)
    and XXSTR.CUSTOMER_ID=nvl(:2,XXSTR.CUSTOMER_ID)
    But i need to pass only one value to this query: throw the below code
    public void passTocusttrxn(String vcustid)
    System.out.println("The customer id in trxn vo:"+vcustid);
    XxcurtradeconsummaryVOImpl vOrdnumb=getXxcurtradeconsummaryVO1();
    vOrdnumb.setWhereClauseParam(0,vcustid);
    vOrdnumb.setWhereClauseParam(1,null);
    vOrdnumb.executeQuery();
    System.out.println("The executed query After is :"+vOrdnumb.getQuery());
    But it throws the below exception.
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could you please tell me how can i achieve this.
    Thanks,

    hi Meher,
    i need to pass this value throug the Spell Parameter.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    XxcustdtlsmainAMImpl am=(XxcustdtlsmainAMImpl)pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("PCustID")!=null) // PCustID is the Spell parameter here
    if(pageContext.getParameter("PbtchID")!=null)
    if(pageContext.getParameter("PordNum")!=null)
    String vcustID=pageContext.getParameter("PCustID");
    String vOrdNum=pageContext.getParameter("PordNum");
    System.out.println("The cust id in PR:"+vcustID);
    System.out.println("The cust id in PR:"+vOrdNum);
    am.passTocustlinetrxn(vcustID);
    how this vcustID value will passed to the search Code.
    if(pageContext.getParameter("BatchID")!=null && !pageContext.getParameter("BatchID").equals(""))
    String BchID=pageContext.getParameter("BatchID");
    int vInBtchID=Integer.parseInt(BchID);
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(0,vInBtchID);
    System.out.println("The Batch ID is :"+vInBtchID);
    f=1;
    }else
    srchVO.setWhereClauseParam(0,null);
    if(pageContext.getParameter("CustmeCode")!=null && !pageContext.getParameter("CustmeCode").equals(""))
    System.out.println("i am im customer code ");
    String vCustID=pageContext.getParameter("CustmeCode");
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(1,vCustID);
    System.out.println("The customer code is "+vCustID);
    f=1;
    }else
    srchVO.setWhereClauseParam(1,null);
    if(f==1)
    srchVO.executeQuery();
    Regards,

  • How to insert more than one values

    Oracle 9i
    Hi all
    I have 80 values how to insert it in a single time, it is in production
    This is my insert statement
    Insert into FND_LOOKUP_VALUES
    (LOOKUP_TYPE,LANGUAGE,LOOKUP_CODE,MEANING,DESCRIPTION,ENABLED_FLAG,
    START_DATE_ACTIVE,END_DATE_ACTIVE,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,L
    AST_UPDATE_LOGIN,
    LAST_UPDATE_DATE,SOURCE_LANG,SECURITY_GROUP_ID,VIEW_APPLICATION_ID,TERRITORY
    _CODE,
    ATTRIBUTE_CATEGORY,ATTRIBUTE1,ATTRIBUTE2,ATTRIBUTE3,ATTRIBUTE4,ATTRIBUTE5,AT
    TRIBUTE6,ATTRIBUTE7,ATTRIBUTE8,ATTRIBUTE9,ATTRIBUTE10,ATTRIBUTE11,ATTRIBUTE1
    2,ATTRIBUTE13,ATTRIBUTE14,ATTRIBUTE15,TAG,LEAF_NODE)
    values ('XXHDNL_SHIPPABLE_POSTCODES','US','CF47 9','CF47 9','CF47 9','Y',
    to_date('23-JUL-09','DD-MON-RR'),null,1090,to_date('23-JUL-09','DD-MON-RR'),
    1090,47626,to_date('23-JUL-09','DD-MON-RR'),'US',0,3,null,null,null,null,nul
    l,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    I need to change the values in the field LOOKUP_CODE,MEANING,DESCRIPTION
    there are 80 values it takes time to insert one one value each time.
    The values are like this
    DE1,DE1,DE1
    D3,D3,D3
    DE5,DE5,DE5
    DE11,DE11,DE11
    DE12,DE12,DE12
    DE13,DE13DE13
    How to do this?
    Any help is highly appricatble
    Thanks & regards
    Srikkanth.M
    Edited by: Srikkanth.M on Jan 14, 2011 6:04 PM

    If the code is autonumeric ... then try
    insert into FND_LOOKUP_VALUES (LOOKUP_TYPE,
                                                      LANGUAGE,
                                                      LOOKUP_CODE,
                                                      MEANING,
                                                      DESCRIPTION,
                                                      ENABLED_FLAG,
                                                      START_DATE_ACTIVE,
                                                      CREATED_BY,
                                                      CREATION_DATE,
                                                      LAST_UPDATED_BY,
                                                      LAST_UPDATE_LOGIN,
                                                      LAST_UPDATE_DATE,
                                                      SOURCE_LANG,
                                                      SECURITY_GROUP_ID,
                                                      VIEW_APPLICATION_ID                                                 
    SELECT 'XXHDNL_SHIPPABLE_POSTCODES',
               'US',
               'DE' || level,
               'DE' || level,
               'DE' || level,
               'Y',
                to_date('23-JUL-09','DD-MON-RR'),
               1090,
               to_date('23-JUL-09','DD-MON-RR'),
               1090,
               47626,
               to_date('23-JUL-09','DD-MON-RR'),
               'US',
               0,
               3
    from dual connect by level < 81

  • URGENT: passing more than one value at the same parameter

    Hello friends at www.oracle.com,
    if I have a Forms program that sends some parameters to a Report, how can I send more than one value at the same parameter that is being sent?
    For example: the Reports parameter P_CODE should receive (from Forms) and print the values 1, 2, 3 and 4, each one in a different page. But, only 4 is being printed, and these values aren't saved at a database, so I have to pass the other three values too. How can I solve this problem?
    This is quite urgent and I need help on this.
    Best regards,
    Franklin Gongalves Jr.
    [email protected]

    Thanks to Oracle Reports Team for answering! I'm sure this will work.
    Best regards,
    Franklin Gongalves Jr.
    [email protected]
    hello,
    on the forms side, you will have to build the list for this parameter by e.g. string concat.
    on the reports side you will have to "decode" this parameter according to how you built it in forms.
    e.g. if you pass the list like this "10~20~30" you might use a where-clause in the query
    ... where instr(myCol, :myParam) >0
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

Maybe you are looking for