Named quaries

Hi all,
I want to use named query offered by toplink but when I execute my java code I have this error:
EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-01008: Toutes les variables ne sont pas liées
Below the java source generated by toplink:
//Named Queries
//Named Query -- FindCPSById
ReadAllQuery namedQuery0 = new ReadAllQuery(riad.rm.marche.beans.consultation.CCps.class);
     namedQuery0.setSQLString("select * from C_CPS where ID_CPS = ?1");
     namedQuery0.setName("FindCPSById");
     namedQuery0.setCascadePolicy(1);
     namedQuery0.setQueryTimeout(0);
     namedQuery0.setShouldUseWrapperPolicy(false);
     namedQuery0.setShouldBindAllParameters(true);
     namedQuery0.setShouldCacheStatement(false);
     namedQuery0.setSessionName("security");
     namedQuery0.setShouldMaintainCache(true);
     namedQuery0.setShouldRefreshIdentityMapResult(false);
     namedQuery0.setLockMode((short)0);
     namedQuery0.addArgument("1", java.lang.Double.class);
     descriptor.getQueryManager().addQuery("FindCPSById", namedQuery0);
And my code source test :
Vector vecParam = new Vector();
Double id = new Double(8);
vecParam.addElement(id);
Collection cCPS =Collection cCPS = (Collection) session.executeQuery("FindCPSById",CCps.class,vecParam);
Thanks,

Hello dadsi,
TopLink does not use the ?x parameter delimiter in custom sql (unlike ejbql).
Instead we use #<name> where name is the name of the argument (addArgument()) added to the query.
So your sql string would look like "select * from c_cps where id_cps=#1" Note that you can use meaningful names, rather than just numbers for your arguments.
I hope this helps,
Christian

Similar Messages

  • All Downloads named "download", iTunes keeps "resettiing-first run" and more...

         I have just copied the original text sent to Apple Support, hoping someone has had the same problems so I can compare results. Currently their is not a fix for any of my problems.  I will have to manually rename, move, and add into my library each file.  I will have to change preferences to what I prefer whenever they reset to defaults.  All of this is very time-consuming and annoying...  Please add some comments, even if you have the same problems without any "fixes" either.  
    Thank you,
    GentleMon Todd.
    ...original message...
    I have THREE(3) issues that are a serious problem.
    Problem #1:
         The iTunes program itself keeps "resetting" itself, as if I just installed it for the first time. All my preferences reset to the defaults and the "take a tour" separate window-or-program pops up as well. I do not use a the default directory for my library and several other issues as well. I have had files disappear and reappear in a random fashion. Not mention that having to change all the preferences, and reset my AppleID account and password goes beyond annoying. Good thing this software is free...
        This can happen as much as 3 times in a day, but in the last 4 months alone, I have had to change everything at least 13 (thirteen) times.  Oh yeah, just happen today, Friday, after it happen on Wednesday.
         This problems started back around "9.x" versions and has continued throughout current versions "10.x" as well. You got e-mails then, and now again.... this problem alone is enough to cause complete chaos.
    Problem #2: all files are named "download"
         All podcast episodes are called "download", music and music videos are called "download". For example; download.mp4, download.m4v, download.mp3, etc. As well as not in the proper directory, see problem # 3.
    Problem #3:
         All of the podcasts downloads, regardless of the podcast, is being dumped in the "library-downloads" directory. Within that particular directory I will have another directory for each single episode of each podcast downloaded. The episodes should be put in the particular PODCAST DIRECTORY not as a new directory for each episode. Not mention music goes to the music directory.
         The music downloads are doing the same thing, except for the directory has "_tmp" added to after the name of the song. within that directory is the file finally.
    For example, the free video of the week download looks like this:
    ...iTunes Library...
         Downloads
              Don't Sit Down 'Cause I've Moved You.tmp
                   download.m4v                (finally, the actually file, not under "music")
    please help resolve some of these issues at hand.
    GentleMon Todd

    Hello, djhood17.
    Thank you for the question.  Try the steps in the article below regarding the reset loop you are experiencing.  Start with the section labeled Constantly restarting. 
    iPod nano (6th generation): Hardware troubleshooting
    http://support.apple.com/kb/ts3474
    Regards,
    Jason H. 

  • I am getting a warning message when i am trying to create a host-named sitecollection.

    Hi guys,
          I am trying to create a host-named site collection. I have created the root site collection. After that i have tried to create customer root site. I have doing this process with the guidance of this link.
    http://technet.microsoft.com/en-us/library/cc424952.aspx#section2a
    When i tried to create a customer root site. I am getting a warning message
    " WARNING: The port specified for the new host header site does not match any known bindings in the specified Web
    Application.  The new site will not be accessible if the Web Application is not extended to an IIS Web Site serving
    this port."
    I couldn't when this warning message comes. I tried to bind the server with webapplication which is created for host-named site collection. No use.
    Can anyone help me to solve. And i wanna know why this error message comes!!!
    Thanks in advance
    Rajendran.

    First, you shouldn't create a host named site collection on a Web app that has host header named.  Doing that implements host names at two different levels and will not work reliably.  Second I'm not sure what you mean when you say you didn't
    use the FQDN but used just the domain name.  A Full url will always be either an FQDN or a shorter Netbios name.  If you use a Netbios name it simply assumes the local AD domain of the workstation to create an FQDN as the url  There is no way
    to use just the domain name.  For example, Contoso.com is the domain name.  Server.contoso.com or WEbsite.contoso.com are FQDNs.  YOu can also use a shorter version that is just server or website, but when those resolve in TCP/IP they would
    still resolve using server.contoso.com or website.contoso.com if the workstation where your browser is was in the contoso.com domain.  What is the URL for your root site and your host named site?
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How do I identify an iTunes Library that isn't named on my WAN?

    You'd think people wouldn't be so secretive!
    we have 800 employees at work and
    about 1/2 have iTunes ( mix of Macs and PCs).
    They all share their libraries up for others to listen,
    but many of them do not have their libraries named.
    Is there a way to identify who's Mac at least is hosting which
    library? Short of calling everyone in the plant that is?

    When you go to Settings>Store can you sign out and sign in with your ID?
    That should work with purchasing new apps. It is likely that the other users purchased apps with his account. You have to log into the account that purchased apps to update them. If you have apps that need updating that were purchased from more than one account, you have to update the apps one at a time until the remaining apps were purchased with one account.

  • How to add folder/project name to a File Naming preset

    Here's a tip to automatically add the name of the Project or its parent Folder to the filename during Import or Batch Change.
    I always used a custom field for adding my client's name to the filename upon Import or Batch Changing versions or masters. But often I would forget to change the custom name, and since it's auto-populated with the previous entry, I'd end up with a bunch of files with the wrong client's name on them. That looks kind of bad. So once I saw with Aperture 3 you can add the Project name or Folder name when relocating referenced files to the new folder structure, I was excited to be able to do the same for the filenames at import. Well, no such luck. They're not an option when you create a custom File Naming preset.
    However, I recently decided to poke around inside some plist files, and found a workaround. I discovered the format string for Folder Name is %F and Project Name is %P. The trick is getting the code into the Format Field where you create the preset.
    Create a new File Naming preset by choosing "edit" from the Version Name menu during Import or Batch Change. Drag everything you want in the name into the Format field, and enter %F or %P where you want the Folder or Project name. The tricky part is that you can't insert it between two existing criteria. It only works at the very end. After you have it in place, you can drag the criteria around to get it in the order you want.
    The alternative method is to insert the code directly into the plist. PLEASE, always make sure you're working with a copy and have a good backup when you're poking around in such things. If you have trouble getting the code to take from within Aperture, you can try this. Same as above, create a new preset, but this time, enter an F or P where you want the Folder or Project name. Give it a unique preset name and save it. Then Quit Aperture. Navigate to ~/Library/Application Support/Aperture/FileNamingPresets.plist, and make a copy of the file, then open with Property List Editor. Dropdown the plist and then dropdown the item you want to edit. You should recognize it by the preset name. Now the easy part. Click in the FormatString field and insert the % character before the F or P you entered in the Format field. Save and you're done.
    I discovered later that while the Folder and Project name works just fine during import, for some reason only the Project name works during Batch Change. The Folder name simply creates a "-" in the filename.
    In case this is seen as a hack and gets deleted, I'm also submitting it to http://www.macosxhints.com/ and I suspect if anyone from MacCreate sees it, they'll steal it too, as they're known to do.

    I do not think there is an out of the box way to do this.
    The immediate solution that comes to mind is using a workflow, that runs everytime  a document is uploaded/item created, which may be too much for your scenario.
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:
      

  • Unable to Create Quotations in Oracle Apps with named PL/SQL Block

    Dear All,
    I got struced while creating Qotations from the backend using oracle API in a Procedure.But the same API working fine in Anonymous block and creating Qutations in apps.But the in parameters are same in anonymous and named bolck.i have done Debugging also and its returning in parameter values.but quotations not created in apps.
    I am sending the both scripts(named plsql and anonymous blocks) please anybody knows about this correct me where iam doing mistake.
    *******anonymous bolck*********
    DECLARE
    X_ROWID VARCHAR2(200) :=NULL;
    X_PO_HEADER_ID NUMBER :=NULL;
    X_AGENT_ID NUMBER :=25;
    X_TYPE_LOOKUP_CODE VARCHAR2(200) :='QUOTATION';
    X_LAST_UPDATE_DATE DATE :=SYSDATE;
    X_LAST_UPDATED_BY NUMBER :=1318;
    X_SEGMENT1 VARCHAR2(200) :=2477;
    X_SUMMARY_FLAG VARCHAR2(200) :='N';
    X_ENABLED_FLAG VARCHAR2(200) :='Y';
    X_SEGMENT2 VARCHAR2(200);
    X_SEGMENT3 VARCHAR2(200);
    X_SEGMENT4 VARCHAR2(200);
    X_SEGMENT5 VARCHAR2(200);
    X_START_DATE_ACTIVE DATE;
    X_END_DATE_ACTIVE DATE;
    X_LAST_UPDATE_LOGIN NUMBER :=45786;
    X_CREATION_DATE DATE :=SYSDATE;
    X_CREATED_BY NUMBER :=1318;
    X_VENDOR_ID NUMBER :=5;
    X_VENDOR_SITE_ID NUMBER :=6;
    X_VENDOR_CONTACT_ID NUMBER :=181;
    X_SHIP_TO_LOCATION_ID NUMBER :=204;
    X_BILL_TO_LOCATION_ID NUMBER :=207;
    X_TERMS_ID NUMBER :=10013;
    X_SHIP_VIA_LOOKUP_CODE VARCHAR2(200) :='UPS';
    X_FOB_LOOKUP_CODE VARCHAR2(200) :='Origin';
    X_PAY_ON_CODE VARCHAR2(200);
    X_FREIGHT_TERMS_LOOKUP_CODE VARCHAR2(200) :='Due';
    X_STATUS_LOOKUP_CODE VARCHAR2(200) :='A';
    X_CURRENCY_CODE VARCHAR2(200) :='USD';
    X_RATE_TYPE VARCHAR2(200);
    X_RATE_DATE DATE;
    X_RATE NUMBER;
    X_FROM_HEADER_ID NUMBER;
    X_FROM_TYPE_LOOKUP_CODE VARCHAR2(200);
    X_START_DATE DATE;
    X_END_DATE DATE;
    X_BLANKET_TOTAL_AMOUNT NUMBER;
    X_AUTHORIZATION_STATUS VARCHAR2(200);
    X_REVISION_NUM NUMBER;
    X_REVISED_DATE DATE;
    X_APPROVED_FLAG VARCHAR2(200);
    X_APPROVED_DATE DATE;
    X_AMOUNT_LIMIT NUMBER;
    X_MIN_RELEASE_AMOUNT NUMBER;
    X_NOTE_TO_AUTHORIZER VARCHAR2(200);
    X_NOTE_TO_VENDOR VARCHAR2(200);
    X_NOTE_TO_RECEIVER VARCHAR2(200);
    X_PRINT_COUNT NUMBER;
    X_PRINTED_DATE DATE;
    X_VENDOR_ORDER_NUM VARCHAR2(200);
    X_CONFIRMING_ORDER_FLAG VARCHAR2(200);
    X_COMMENTS VARCHAR2(200);
    X_REPLY_DATE DATE;
    X_REPLY_METHOD_LOOKUP_CODE VARCHAR2(200);
    X_RFQ_CLOSE_DATE DATE;
    X_QUOTE_TYPE_LOOKUP_CODE VARCHAR2(200) :='CATALOG';
    X_QUOTATION_CLASS_CODE VARCHAR2(200) :='CATALOG';
    X_QUOTE_WARNING_DELAY_UNIT VARCHAR2(200);
    X_QUOTE_WARNING_DELAY NUMBER :=7;
    X_QUOTE_VENDOR_QUOTE_NUMBER VARCHAR2(200);
    X_ACCEPTANCE_REQUIRED_FLAG VARCHAR2(200);
    X_ACCEPTANCE_DUE_DATE DATE;
    X_CLOSED_DATE DATE;
    X_USER_HOLD_FLAG VARCHAR2(200);
    X_APPROVAL_REQUIRED_FLAG VARCHAR2(200);
    X_CANCEL_FLAG VARCHAR2(200);
    X_FIRM_STATUS_LOOKUP_CODE VARCHAR2(200);
    X_FIRM_DATE DATE;
    X_FROZEN_FLAG VARCHAR2(200);
    X_SUPPLY_AGREEMENT_FLAG VARCHAR2(200) :='L';
    X_GLOBAL_AGREEMENT_FLAG VARCHAR2(200);
    X_ATTRIBUTE_CATEGORY VARCHAR2(200);
    X_ATTRIBUTE1 VARCHAR2(200);
    X_ATTRIBUTE2 VARCHAR2(200);
    X_ATTRIBUTE3 VARCHAR2(200);
    X_ATTRIBUTE4 VARCHAR2(200);
    X_ATTRIBUTE5 VARCHAR2(200);
    X_ATTRIBUTE6 VARCHAR2(200);
    X_ATTRIBUTE7 VARCHAR2(200);
    X_ATTRIBUTE8 VARCHAR2(200);
    X_ATTRIBUTE9 VARCHAR2(200);
    X_ATTRIBUTE10 VARCHAR2(200);
    X_ATTRIBUTE11 VARCHAR2(200);
    X_ATTRIBUTE12 VARCHAR2(200);
    X_ATTRIBUTE13 VARCHAR2(200);
    X_ATTRIBUTE14 VARCHAR2(200);
    X_ATTRIBUTE15 VARCHAR2(200);
    X_CLOSED_CODE VARCHAR2(200);
    X_USSGL_TRANSACTION_CODE VARCHAR2(200);
    X_GOVERNMENT_CONTEXT VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE_CATEGORY VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE1 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE2 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE3 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE4 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE5 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE6 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE7 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE8 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE9 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE10 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE11 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE12 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE13 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE14 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE15 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE16 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE17 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE18 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE19 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE20 VARCHAR2(200);
    X_MANUAL BOOLEAN;
    X_PRICE_UPDATE_TOLERANCE NUMBER;
    P_SHIPPING_CONTROL VARCHAR2(200);
    P_ENCUMBRANCE_REQUIRED_FLAG VARCHAR2(200);
    BEGIN
    APPS.PO_HEADERS_SV11.INSERT_PO(X_ROWID ,
    X_PO_HEADER_ID ,
    X_AGENT_ID ,
    X_TYPE_LOOKUP_CODE ,
    X_LAST_UPDATE_DATE ,
    X_LAST_UPDATED_BY ,
    X_SEGMENT1 ,
    X_SUMMARY_FLAG ,
    X_ENABLED_FLAG ,
    X_SEGMENT2 ,
    X_SEGMENT3 ,
    X_SEGMENT4 ,
    X_SEGMENT5 ,
    X_START_DATE_ACTIVE ,
    X_END_DATE_ACTIVE ,
    X_LAST_UPDATE_LOGIN ,
    X_CREATION_DATE ,
    X_CREATED_BY ,
    X_VENDOR_ID ,
    X_VENDOR_SITE_ID ,
    X_VENDOR_CONTACT_ID ,
    X_SHIP_TO_LOCATION_ID ,
    X_BILL_TO_LOCATION_ID ,
    X_TERMS_ID ,
    X_SHIP_VIA_LOOKUP_CODE ,
    X_FOB_LOOKUP_CODE ,
    X_PAY_ON_CODE ,
    X_FREIGHT_TERMS_LOOKUP_CODE ,
    X_STATUS_LOOKUP_CODE ,
    X_CURRENCY_CODE ,
    X_RATE_TYPE ,
    X_RATE_DATE ,
    X_RATE ,
    X_FROM_HEADER_ID ,
    X_FROM_TYPE_LOOKUP_CODE ,
    X_START_DATE ,
    X_END_DATE ,
    X_BLANKET_TOTAL_AMOUNT ,
    X_AUTHORIZATION_STATUS ,
    X_REVISION_NUM ,
    X_REVISED_DATE ,
    X_APPROVED_FLAG ,
    X_APPROVED_DATE ,
    X_AMOUNT_LIMIT ,
    X_MIN_RELEASE_AMOUNT ,
    X_NOTE_TO_AUTHORIZER ,
    X_NOTE_TO_VENDOR ,
    X_NOTE_TO_RECEIVER ,
    X_PRINT_COUNT ,
    X_PRINTED_DATE ,
    X_VENDOR_ORDER_NUM ,
    X_CONFIRMING_ORDER_FLAG ,
    X_COMMENTS ,
    X_REPLY_DATE ,
    X_REPLY_METHOD_LOOKUP_CODE ,
    X_RFQ_CLOSE_DATE ,
    X_QUOTE_TYPE_LOOKUP_CODE ,
    X_QUOTATION_CLASS_CODE ,
    X_QUOTE_WARNING_DELAY_UNIT ,
    X_QUOTE_WARNING_DELAY ,
    X_QUOTE_VENDOR_QUOTE_NUMBER ,
    X_ACCEPTANCE_REQUIRED_FLAG ,
    X_ACCEPTANCE_DUE_DATE ,
    X_CLOSED_DATE ,
    X_USER_HOLD_FLAG ,
    X_APPROVAL_REQUIRED_FLAG ,
    X_CANCEL_FLAG ,
    X_FIRM_STATUS_LOOKUP_CODE ,
    X_FIRM_DATE ,
    X_FROZEN_FLAG ,
    X_SUPPLY_AGREEMENT_FLAG ,
    X_GLOBAL_AGREEMENT_FLAG ,
    X_ATTRIBUTE_CATEGORY ,
    X_ATTRIBUTE1 ,
    X_ATTRIBUTE2 ,
    X_ATTRIBUTE3 ,
    X_ATTRIBUTE4 ,
    X_ATTRIBUTE5 ,
    X_ATTRIBUTE6 ,
    X_ATTRIBUTE7 ,
    X_ATTRIBUTE8 ,
    X_ATTRIBUTE9 ,
    X_ATTRIBUTE10 ,
    X_ATTRIBUTE11 ,
    X_ATTRIBUTE12 ,
    X_ATTRIBUTE13 ,
    X_ATTRIBUTE14 ,
    X_ATTRIBUTE15 ,
    X_CLOSED_CODE ,
    X_USSGL_TRANSACTION_CODE ,
    X_GOVERNMENT_CONTEXT ,
    X_GLOBAL_ATTRIBUTE_CATEGORY ,
    X_GLOBAL_ATTRIBUTE1 ,
    X_GLOBAL_ATTRIBUTE2 ,
    X_GLOBAL_ATTRIBUTE3 ,
    X_GLOBAL_ATTRIBUTE4 ,
    X_GLOBAL_ATTRIBUTE5 ,
    X_GLOBAL_ATTRIBUTE6 ,
    X_GLOBAL_ATTRIBUTE7 ,
    X_GLOBAL_ATTRIBUTE8 ,
    X_GLOBAL_ATTRIBUTE9 ,
    X_GLOBAL_ATTRIBUTE10 ,
    X_GLOBAL_ATTRIBUTE11 ,
    X_GLOBAL_ATTRIBUTE12 ,
    X_GLOBAL_ATTRIBUTE13 ,
    X_GLOBAL_ATTRIBUTE14 ,
    X_GLOBAL_ATTRIBUTE15 ,
    X_GLOBAL_ATTRIBUTE16 ,
    X_GLOBAL_ATTRIBUTE17 ,
    X_GLOBAL_ATTRIBUTE18 ,
    X_GLOBAL_ATTRIBUTE19 ,
    X_GLOBAL_ATTRIBUTE20 ,
    X_MANUAL ,
    X_PRICE_UPDATE_TOLERANCE ,
    P_SHIPPING_CONTROL ,
    P_ENCUMBRANCE_REQUIRED_FLAG );
    END;
    ***************************plsql named block****************
    CREATE OR REPLACE Procedure p6(p_row_id IN OUT VARCHAR2
    ,p_po_header_id IN OUT NUMBER
    ,p_segment1 IN OUT VARCHAR2
    ,p_Type_Lookup_Code IN VARCHAR2
                             ,p_agent_id IN NUMBER
    ,p_vendor_id IN NUMBER
    ,p_vendor_site_id IN NUMBER
    ,p_Ship_To_Location_Id IN NUMBER
    ,p_Bill_To_Location_Id IN NUMBER
    ,p_terms_id IN NUMBER
    ,p_fob_lookup_code IN VARCHAR2
    ,p_Freight_Terms_Lookup_Code IN VARCHAR2
    ,p_Currency_Code IN VARCHAR2
    --,p_Start_Date IN DATE
                             ,p_Quote_Type_Lookup_Code IN VARCHAR2
    --,p_quote_warning_delay IN VARCHAR2
    --,p_Vendor_Quote_Number IN VARCHAR2
    ,p_last_update_date IN DATE
    ,p_last_updated_by IN NUMBER
    ,p_last_update_login IN NUMBER
    ,p_creation_date IN DATE
    ,p_created_by IN NUMBER
    ,p_Ship_Via_Lookup_Code IN varchar2
                             ,p_Vendor_Contact_Id IN NUMBER
    --,p_res_ship_via IN VARCHAR2
    ,p_Comments IN VARCHAR2
    ,P_Supply_Agreement_Flag IN VARCHAR2
    ,p_organization_id IN VARCHAR2
    --,p_procurement_channel IN VARCHAR2
    --,p_Manual IN BOOLEAN
    --,p_return_status OUT VARCHAR2
    ,P_Authorization_Status IN VARCHAR2
                             -- ,p_error_msg OUT VARCHAR2
                        ,p_Summary_Flag in varchar2
                        ,p_Enabled_Flag in varchar2
                        ,p_Status_Lookup_Code in varchar2
                        ,p_Quotation_Class_Code in varchar2
                        ,p_Approval_Required_Flag in varchar2
                        --,X_shipping_control VARCHAR2 -- <INBOUND LOGISTICS FPJ>
    --,X_encumbrance_required_flag VARCHAR2
                        ) AS
    v_segment1 varchar2(50):=null;
    v_po_header_id number:=null;
    v_row_id varchar2(50):=null;
    BEGIN
    po_headers_sv11.insert_po(X_Rowid => v_row_id --VARCHAR2
    ,X_Po_Header_Id => v_po_header_id --NUMBER
    ,X_Agent_Id => p_agent_id --NUMBER
    ,X_Type_Lookup_Code => p_Type_Lookup_Code
    ,X_Segment1 => v_segment1 --VARCAHR2
    ,X_Summary_Flag => p_Summary_Flag
    ,X_Enabled_Flag => p_Enabled_Flag
    ,X_Vendor_Id => p_vendor_id --NUMBER
    ,X_Vendor_Site_Id => p_vendor_site_id --NUMBER
    ,X_Ship_To_Location_Id => p_Ship_To_Location_Id --NUMBER
    ,X_Bill_To_Location_Id => p_Bill_To_Location_Id --NUMBER
    ,X_Terms_Id => p_terms_id --NUMBER
    ,X_Fob_Lookup_Code => p_fob_lookup_code --VARCHAR
    ,X_Freight_Terms_Lookup_Code => p_Freight_Terms_Lookup_Code --VARCHAR
    ,X_Status_Lookup_Code => p_Status_Lookup_Code -- Active
    ,X_Currency_Code => p_Currency_Code --VARCHAR
    ,X_Start_Date =>NULL--p_start_date --DATE
    ,X_Reply_Date => NULL--p_Start_Date --DATE
    ,X_Quote_Type_Lookup_Code => p_Quote_Type_Lookup_Code --VARCHAR
    ,X_Quotation_Class_Code => p_Quotation_Class_Code
    ,X_Quote_Warning_Delay => NULL--p_quote_warning_delay --VARCHAR
    ,X_Quote_Vendor_Quote_Number => NULL--p_Vendor_Quote_Number --VARCHAR
    ,X_Approval_Required_Flag => p_Approval_Required_Flag
    ,X_Last_Update_Date => p_last_update_date --DATE
    ,X_Last_Updated_By => p_last_updated_by --NUMBER
    ,X_Segment2 => NULL
    ,X_Segment3 => NULL
    ,X_Segment4 => NULL
    ,X_Segment5 => NULL
    ,X_Start_Date_Active => NULL
    ,X_End_Date_Active => NULL
    ,X_Last_Update_Login => p_last_update_login --NUMBER
    ,X_Creation_Date => p_creation_date --DATE
    ,X_Created_By => p_created_by --NUMBER
    ,X_Vendor_Contact_Id => p_vendor_contact_id --NUMBER
    ,X_Ship_Via_Lookup_Code => p_Ship_Via_Lookup_Code
    ,X_Pay_On_Code => NULL
    ,X_Rate_Type => NULL
    ,X_Rate_Date => NULL
    ,X_Rate => NULL
    ,X_From_Header_Id => NULL
    ,X_From_Type_Lookup_Code => NULL
    ,X_End_Date => NULL
    ,X_Blanket_Total_Amount => NULL
    ,X_Authorization_Status => P_Authorization_Status
    ,X_Revision_Num => NULL
    ,X_Revised_Date => NULL
    ,X_Approved_Flag => NULL
    ,X_Approved_Date => NULL
    ,X_Amount_Limit => NULL
    ,X_Min_Release_Amount => NULL
    ,X_Note_To_Authorizer => NULL
    ,X_Note_To_Vendor => NULL
    ,X_Note_To_Receiver => NULL
    ,X_Print_Count => NULL
    ,X_Printed_Date => NULL
    ,X_Vendor_Order_Num => NULL
    ,X_Confirming_Order_Flag => NULL
    ,X_Comments => NULL
    ,X_Reply_Method_Lookup_Code => NULL
    ,X_Rfq_Close_Date => NULL
    ,X_Quote_Warning_Delay_Unit => NULL
    ,X_Acceptance_Required_Flag => NULL
    ,X_Acceptance_Due_Date => NULL
    ,X_Closed_Date => NULL
    ,X_User_Hold_Flag => NULL
    ,X_Cancel_Flag => 'N'
    ,X_Firm_Status_Lookup_Code => NULL
    ,X_Firm_Date => NULL
    ,X_Frozen_Flag => NULL
    ,X_Supply_Agreement_Flag => P_Supply_Agreement_Flag
    ,X_Global_Agreement_Flag => NULL
    ,X_Attribute_Category => NULL
    ,X_Attribute1 => NULL
    ,X_Attribute2 => NULL
    ,X_Attribute3 => p_organization_id
    ,X_Attribute4 => NULL
    ,X_Attribute5 => NULL
    ,X_Attribute6 => NULL
    ,X_Attribute7 => NULL
    ,X_Attribute8 => NULL
    ,X_Attribute9 => NULL
    ,X_Attribute10 => NULL
    ,X_Attribute11 => NULL
    ,X_Attribute12 => NULL
    ,X_Attribute13 => NULL
    ,X_Attribute14 => NULL
    ,X_Attribute15 => NULL
    ,X_Closed_Code => NULL
    ,X_Ussgl_Transaction_Code => NULL
    ,X_Government_Context => NULL
    ,X_Global_Attribute_Category => NULL
    ,X_Global_Attribute1 => NULL
    ,X_Global_Attribute2 => NULL
    ,X_Global_Attribute3 => NULL
    ,X_Global_Attribute4 => NULL
    ,X_Global_Attribute5 => NULL
    ,X_Global_Attribute6 => NULL
    ,X_Global_Attribute7 => NULL
    ,X_Global_Attribute8 => NULL
    ,X_Global_Attribute9 => NULL
    ,X_Global_Attribute10 => NULL
    ,X_Global_Attribute11 => NULL
    ,X_Global_Attribute12 => NULL
    ,X_Global_Attribute13 => NULL
    ,X_Global_Attribute14 => NULL
    ,X_Global_Attribute15 => NULL
    ,X_Global_Attribute16 => NULL
    ,X_Global_Attribute17 => NULL
    ,X_Global_Attribute18 => NULL
    ,X_Global_Attribute19 => NULL
    ,X_Global_Attribute20 => NULL
    ,X_Manual => NULL
    ,X_Price_Update_Tolerance => NULL
                             ,p_shipping_control=> NULL--X_shipping_control -- <INBOUND LOGISTICS FPJ>
    ,p_encumbrance_required_flag=> NULL--X_encumbrance_required_flag
                             commit;
    dbms_output.put_line('agent_id:'||p_agent_id);
    dbms_output.put_line('segment1:'||P_segment1);
    dbms_output.put_line('SHIP_TO_LOCATION_ID:'||P_SHIP_TO_LOCATION_ID);
    dbms_output.put_line('BILL_TO_LOCATION_ID:'||P_BILL_TO_LOCATION_ID);
    dbms_output.put_line('VENDOR_SITE_ID:'||P_VENDOR_ID);
    dbms_output.put_line('VENDOR_SITE_ID:'||P_VENDOR_SITE_ID);
    dbms_output.put_line('SUPPLY_AGREEMENT_FLAG:'||P_SUPPLY_AGREEMENT_FLAG);
    dbms_output.put_line('QUOTE_TYPE_LOOKUP_CODE:'||p_QUOTE_TYPE_LOOKUP_CODE);
    dbms_output.put_line('FREIGHT_TERMS_LOOKUP_CODE:'||P_FREIGHT_TERMS_LOOKUP_CODE);
    dbms_output.put_line('AUTHORIZATION_STATUS:'||P_AUTHORIZATION_STATUS);
    dbms_output.put_line('ORGANIZATION_ID:'||p_ORGANIZATION_ID);
    dbms_output.put_line('VENDOR_CONTACT_ID:'||P_VENDOR_CONTACT_ID);
    dbms_output.put_line('Type_Lookup_Code:'||p_Type_Lookup_Code);
    dbms_output.put_line('Summary_Flag:'||p_Summary_Flag);
    dbms_output.put_line('Enabled_Flag:'||p_Enabled_Flag);
    dbms_output.put_line('Comments:'||p_Comments);
    dbms_output.put_line('Currency_Code:'||p_Currency_Code);
    dbms_output.put_line('Authorization_Status:'||P_Authorization_Status);
    dbms_output.put_line('Status_Lookup_Code:'||p_Status_Lookup_Code);
    dbms_output.put_line('Quotation_Class_Code:'||p_Quotation_Class_Code);
    dbms_output.put_line('Approval_Required_Flag:'||p_Approval_Required_Flag);
    dbms_output.put_line('last_update_login:'||p_last_update_login);
    dbms_output.put_line('created_by:'||p_created_by);
    dbms_output.put_line('last_update_date:'||p_last_update_date);
    dbms_output.put_line('Vendor_Contact_Id:'||p_Vendor_Contact_Id);
    dbms_output.put_line('fob_lookup_code:'||p_fob_lookup_code);
    EXCEPTION
    WHEN OTHERS THEN
    --p_return_status :='E';
    --p_error_msg     :='ERROR during Insert in PO_HEADERS.'||CHR(10)||SQLERRM;
    raise;
    END p6;
    Regards,
    YellaGoud

    What is your current Oracle user ?
    show userTry to identify the table owner:
    select owner from dba_tables where table_name='CE1LAOC';And add <table owner> as prefix to table name:
    CREATE INDEX Z05 ON <table_owner>.CE1LAOC (MANDT, PALEDGER, BUKRS, PERIO, VRGAR, VKORG, HZDAT);

  • Cannot connect to a named instance using SSMS from a remote machine

    Hi all,
       SQL Server.....: 2012 EE
       OS...................:  Windows Server 2008 R2
       I have a desktop machine, that i am using to administrer SQL Server (via SSMS) and to develop my SSIS solutions, but i can't connect to a named instance of my SQL Server. When i try to connect using SSMS to my named instance (myhost\DWSERVER)
    i get a huge error message:
    A network-related or instance-specific error occurred while establisinh a connection to SQL Server. The server was not found or was not accessible. Verify that the instance is correct and that SQL Server is configured to allow remote connections.
    (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
    Locally, i am able to access that named instance using SSMS, just when i try to access from another machine, the above error pops-up to me.
    I am using the SQL Server Authentication mode to connect to the named instance.
    What am i doing wrong?
    Thanks in advance.
    Fabrício Pedroso Jorge Database Administrator - Belém, Pará, Brazil

    Hi,
       thanks for your attention.
       That's correct, i can connect to my default instance both locally and remotelly. The default instance in on port 1433. I cannot find the port used by the named instance (DWSERVER).
       Actually, i found this on the errorlog from the named instance:
       2015-03-22 10:10:45.80 spid13s     Server is listening on [ 'any' <ipv6> 49411].
       2015-03-22 10:10:45.80 spid20s     Server is listening on [ 'any' <ipv6> 5023].
       2015-03-22 10:10:45.81 spid20s     Server is listening on [ 'any' <ipv4> 5023].
       2015-03-22 10:10:45.81 spid20s     The Database Mirroring endpoint is now listening for connections.
       2015-03-22 10:10:46.12 spid13s     Server is listening on [ 'any' <ipv4> 49411].
       2015-03-22 10:10:46.25 spid13s     Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\DWSERVER ].
       2015-03-22 10:10:46.26 spid13s     Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$DWSERVER\sql\query ].
       2015-03-22 10:10:46.26 Server      Server is listening on [ ::1 <ipv6> 49412].
       2015-03-22 10:10:46.26 Server      Server is listening on [ 127.0.0.1 <ipv4> 49412].
       I can ping normally to the remote server.
    Fabrício Pedroso Jorge Database Administrator - Belém, Pará, Brazil

  • How to write named query if we want to use IN syntax in our sql statement?

    I cannot find a suitable category about named query, so please move to appropriate place if there is any.
    When we write named query, below statement is fine.
    Query q2 = em.createQuery("SELECT o FROM Table1 as o WHERE field1 = :input1");             q2.setParameter("input1", "value1");
    Now, my question is, how can I write this type of query when we want to use the IN sql syntax? As below statement CANNOT return correct results. Even I tried to put a pair of single quote [ ':input2' ], it won't help also.
    Query q2 = em.createQuery("SELECT o FROM Table1 as o WHERE field2 IN (:input2)");             q2.setParameter("input1", "3633, 3644");
    Can anyone suggest? Thanks.

    roamer wrote:
    Now, my question is, how can I write this type of query when we want to use the IN sql syntax? As below statement CANNOT return correct results. Even I tried to put a pair of single quote [ ':input2' ], it won't help also.
    Query q2 = em.createQuery("SELECT o FROM Table1 as o WHERE field2 IN (:input2)");
    q2.setParameter("input1", "3633, 3644");
    Can anyone suggest?The above is in your code right? Not in some configuration file?
    Then you do it the same way as with regular jdbc/sql.
    1. You start with a collection of values - call it collection A.
    1. Create a for loop that dynamically creates the string using 'bind' variables (whatever you want to call the 'colon' entity in the above).
    2. Call the createQuery method using the string that was created
    3. Create a second loop that iterates over A and populates with setParameter.
    Pseudo code
            Object[] A = ...
            String sql = "SELECT o FROM Table1 as o WHERE field2 IN (";
            for (int i=1; i <= A.length; i++)
                  if (i == 1)
                     sql += ":input" + i;
                 else
                     sql += ",:input" + i;
            sql += ")";
            Query q2 = em.createQuery(sql);
            for (int i=1; i <= A.length; i++
                  q2.setParameter("input" + i, A[i-1]);
                  }By the way there is a jdbc forum.

  • Why am I getting "There is already an object named '#TempTable...' in the database." within my SQL Server IF Statement

    The creation of My #TempTable is based on my input Parameter and I am getting "There is already an object named '#TempTable_Service_X_Claims' in the database." Why???
    USE [Report]
    GO
    DECLARE @ProviderType CHAR(1)
    SET @ProviderType = 'G'
    IF Object_ID('TempDB..#TempTable_Service_X_Claims') IS NOT NULL DROP TABLE [#TempTable_Service_X_Claims]
    IF @ProviderType = 'I'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013' --AND [affiliation].[PRAC_NBR] = @PracticeNbr
    AND [affiliation].[PRAC_NBR] = 'F330'
    END
    -- THEREFORE, USE THIS QUERY FOR "G" GROUP SELECTION SINCE IT USES [NPI]
    IF @ProviderType = 'G'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013'
    AND [affiliation].[NPI] = '1700947884 '
    END
    Thanks in advance for your review and am hopeful for a reply.
    PSULionRP

    The creation of My #TempTable is based on my input Parameter and I am getting "There is already an object named '#TempTable_Service_X_Claims' in the database." Why???
    USE [Report]
    GO
    DECLARE @ProviderType CHAR(1)
    SET @ProviderType = 'G'
    IF Object_ID('TempDB..#TempTable_Service_X_Claims') IS NOT NULL DROP TABLE [#TempTable_Service_X_Claims]
    IF @ProviderType = 'I'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013' --AND [affiliation].[PRAC_NBR] = @PracticeNbr
    AND [affiliation].[PRAC_NBR] = 'F330'
    END
    -- THEREFORE, USE THIS QUERY FOR "G" GROUP SELECTION SINCE IT USES [NPI]
    IF @ProviderType = 'G'
    BEGIN
    SELECT...
    INTO [#TempTable_Service_X_Claims]
    FROM [dbo].[service_x]
    LEFT JOIN [dbo].[affiliation]
    ON [affiliation].[AFF_NBR] = [service_x].[AFF_NBR]
    AND [affiliation].[PROV_NBR] = [service_x].[Prov_Nbr]
    AND [affiliation].[VOID] = ''
    AND [affiliation].[c_ymdeff] <= [service_x].[C_EFF_DATE]
    AND [affiliation].[c_ymdend] >= [service_x].[C_EFF_DATE]
    WHERE [service_x].[C_EFF_DATE] >= '1/1/2013'
    AND [service_x].[C_EFF_DATE] <= '12/31/2013'
    AND [affiliation].[NPI] = '1700947884 '
    END
    Thanks in advance for your review and am hopeful for a reply.
    PSULionRP
    Is it possible that this procedure is being executed more than once concurrently (even against different databases)) within the instance?
    Microsoft SQL Server Storage Engine PM

  • Naming voice memos on iPhone 3GS not working.

    I have an iPhone 3GS
    I have many voice memos. I try to name them by pressing 'custom' then naming them, but once I quit the application, it NEVER saves the names. Does anyone know why? I know I'm doing everything 'right'; they appear named after I do this, but never after I quit and reopen the application.

    It has been reported that Apple decided to block developer access to libraries using external display on iPhone 2G, 3G and 3GS and iPods 1st, 2nd and 3rd generations.
    While I understand some potential limitations on hardware capabilities for earlier models, the iPhone 3GS can output to TV from Apple private applications such as iPod, YouTube and Pictures/Videos without any problem. I strongly suspect that it is Apple strategy to force people to upgrade to new hardware. I personally find that limitation for the 3GS rather unjustified if it is based on technical limitations (no comment if it is a purely marketing strategy)
    From their technical documentation: [[UIScreen screens]|http://developer.apple.com/library/ios/#documentation/uikit/reference/ UIScreen_Class/Reference/UIScreen.html]
    screens
    Returns an array containing all of the screens attached to the device.
    Not all devices support external displays. Currently, external displays are supported
    by iPhone and iPod touch devices with Retina displays and iPad. Older devices, such as the
    iPhone 3GS do not support external displays. Connecting to an external display requires an
    appropriate cable between the device and display.
    Availability
    Available in iOS 3.2 and later.
    Regards
    Message was edited by: Q.uent

  • Named voice memos on iphone changing names when imported to mac through iTunes.

    I have a lot of memos that have all been named on my iPhone. Now I'm trying to import the voice memos, but I can't seem to make the voice memos keep their original titles. When viewed through iTunes the titles are correct, but when I try and drag the files to a folder the titles are renamed to a generic date and time format. These "wrong" titles are also present when manouvering to the iTunes media folder containing the voice memos.
    Is it really true that you can't make iTunes preserve the original titles?

    An alternative would be to switch to manual management of your iPhone.
    More on that here: http://support.apple.com/kb/ht1351

  • I had two files named graphics and I replaced one graphics file with another which was the wrong one.  Can I undo my replacement?  I move the wrong one, which was on my desktop into another one and that is when it as me if I wanted to replace the file.

    I accidently replaced a file with another.  Can I undo my action? 
    I had two files named graphics.  One was on my desktop and another was within another file called solitarie.  I move the one on my desktop (wrong file) into the solitarie file and was asked if I wanted to replace the graphics file in the solitarie folder (the correct one).  I said yes accidently and then remembered that I had made a mistake.  If I use undo, it only move the wrong file back to the desktop.  Is there an undo of replace?

    Sorry, but's that's why you get the warning. "Replace" means just that - the new file over-writes the old one. There is no undo.

  • My download are going to a different folder. They usually went to a folder named 'Downloads' and now they go to a folder named 'Temp', Why is this?

    Usually when i download something it goes to a folder named 'Download', however, now they go to a folder named 'Temp'.

    Get info on the drive.  What format?  FAT drives may be behave erratically for heavy-duty use of the kind you are doing. It's okay to leave a flash drive FAT formatted for light use but for heavy-duty file transfer I think you can encounter issues.
    iTunes does not look at files directly.  It maintains a database (library.itl) of the files in its collection.  When you play a track it looks up where that file is located and goes and plays the file in that location.  If you manually move a file or folder used by iTunes that database is no longer correct and you get broken links ( ! ).  If you want to move files or folders with iTunes you have to let iTunes do it.  Since iTunes is organizing your library there isn't much flexibility in what you can do other than move the whole collection to a different folder by changing the media location preference in preferences.
    Lion - Disk Utility - https://discussions.apple.com/message/16925522 - repairing your drive using Disk Utility on Lion's recovery partition.

  • When I rip a CD to iTunes. All goes well until I click on All Albums. If there are other artists named with the Title Artist they are shown as different albums so I end up with 16 albums containing 1 track instead of 1 Album with 16 tracks. Can I fix this

    When I rip a CD to iTunes all goes well until I click on All Albums. If there are other artists named as well as the Title Artist, I end up with what appears as 16
    Albums with 1 track instead of 1 Album with 16 tracks. Can I fix this ?

    Had a similar problem with two tracks from a cd being segregated in a separate list, but with the same album title and artwork as the other 19 tracks. I found that by double clicking the artist field next to the album icon you can then edit that info.  In your case it sounds as if you might want to erase the artist info altogether. Once you have done that, all the tracks magically group together, as they should have done in the first place. Oh there might be a dialog box first, asking if you really want to do this.
    Hope this helps.

  • Importing .ISO files into SCVMM2012 R2 - Folder Naming Quirk

    We've run into a folder naming issue in regards to importing .ISO's into the VMM Library. When specifying a folder to import the .ISO into, VMM adds %20 to the folder names where spaces are. Not a huge deal but wonder if anyone has a way around this without
    using dashes or underscores. 
    Orange County District Attorney

    No, it's a bug, I have ran into this all over the UI and has caused me no end of pain. I have reported it but I have had no word if this will ever be fixed 
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. http:\\robbieroberts.wordpress.com

Maybe you are looking for