How we use merge command in pro*C

merge command not support the pro*C pl/sql block how we use in pro*C (without creating any pl block on database )

hello shalab,
u can use dynamic sql method one.for execution merge query.
syntax is
EXEC SQL EXECUTE IMMEDIATE :stmt
u have to copy your query into one string.
like this
strcpy(stmt,"merge into emp_new a ");
strcat(stmt," using emp b ");
strcat(stmt,"on ( a.empno = b.empno) ");
strcat(stmt," when matched then ");
strcat(stmt," update set sal= sal*10 ");
strcat(stmt," when not matched then ");
strcat(stmt," insert (a.empno, a.ename) values ");
strcat(stmt," (b.empno, b.ename); ");
then execute like this.
EXEC SQL EXECUTE IMMEDIATE :stmt

Similar Messages

  • I'm operating CS5 on iMac 10.10.2..Q.  The last two or three times I have tried to use "Merge to HDR Pro" it will not complete the task and closes down.  How do I fix it...I have restarted the system but no help...RDGS, Mike Frey

    I 'm operating CS5 on iMac 10.10.2.....Q.the last two or three times I have tried to use "Merge to HDR Pro" the aplication quits with no image...I have restarted the system which does not solve the problem. 

    Details about your setup, please.
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Need Help Can i use Merge command along with exist function in oracle?

    I am using Merge command to update the destination table and updating the rows which are already in the destination table.
    But what i want is to delete the existing rows from the destination table and insert fresh rows instead of updating the existing rows in the destination table.
    So can we use exist function to check the existing rows and delete them and use merge command to insert the rows in the table.

    You definitely need to do a DELETE then INSERT since MERGE will not delete rows, although I'm not really sure what that gets you since the net effect would be the same as a MERGE over the same pair of tables.
    If you really want to do it this way, then I would likely do something like:
    DELETE FROM target_table
    WHERE (columns_you_would_match_on) IN (SELECT columns_you_would_match_on
                                           FROM source_table
                                           WHERE predicate_you_would_use_in_using);
    INSERT INTO target_table (column_list)
    SELECT column_list
    FROM source_table
    WHERE predicate_you_would_use_in_using;John

  • How to use STSADM commands in sharepoint 2007

    How to use STSADM commands in sharepoint 2007

    Hi,
    There is no such STSADM commands to get the user groups.  There are two separate STSADM commands get either users or groups for particular site.
    STSADM -o enumusers <<url>>
    STSADM -o enumgroups <url>
    For complete reference, please refer to the following article.
    http://blogs.technet.com/b/josebda/archive/2008/03/15/complete-reference-of-all-stsadm-operations-with-parameters-in-moss-2007-sp1.aspx
    One such console application available to get the user groups.  Please refer to the below article.
    List all SharePoint groups a user belongs to
    Please don't forget to mark it as answered, if your problem resolved or helpful.

  • How to use host command for creating folders

    i want to create a folder called abc in my C drive using forms 6i.
    how can i do it using Host command?

    Host('MD C:\ABC');Francois

  • How to use Filter commands in WAD?

    Hello community,
    I am desperately trying to use the command wizzard in order to set a Filter to a chrarcateristic in an 7.0 web template:
    I have been trying these commands so far but it simply doesnt work:
    SET_SELECTION_STATE_SIMPLE
    SET_SELECTION_STATE
    My problem is: When I select the charcateristic which I want to Filter, I get always the Error message, that the characteristic is not a valied characteristic or structure of the Query. But this is not true, the Characteristic is in the query. I have tried for hours now but no success.
    Thanks for any help or advice.
    Carl

    Hi Carl,
    I had the same situation. All you have to do is to update your support package. After that it will work properly.
    I have - Support Package 7, Revision 571
    Regards
    Erwin
    Edited by: Erwin  Buda on Dec 5, 2008 9:47 PM

  • How to use 'bash' command in java?

    Hi,
    I am using Linux operating system
    when i run the following code, 'test.sh' not started
    ================================================================
    String cmd = "bash \"/home/kulandaivelu/Desktop/works/other's works/test.sh\"";
    Runtime.getRuntime().exec(cmd).waitFor();
    ================================================================
    but it started when i use same command(bash "/home/kulandaivelu/Desktop/works/other's works/test.sh") in terminal
    anyone let me know what mistake i made in the code piece..
    Thanks in Advance
    Kulandaivelu

    Hi,
    thanks a lot..
    I used the following code.. it worked well..
    ===============================================================
    String cmd[] = {"bash","/home/kulandaivelu/Desktop/works other's/test.sh"};
    Runtime.getRuntime().exec(cmd).waitFor();
    ===============================================================
    Thanks a lot again..

  • How to use split command in upload program

    Thanks for all ...for their quick response for my previous query.
    Iam continuing with the same upload program,now i have transfered the data from internal table to application server,now iam trying to upload this to database,while doing this iam using split command for spliting the records,but its not at all spliting,can u give me a solution for this.

    OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      if sy-subrc <> 0.
        PERFORM messaging USING 'E' '001' text-e10 p_file space space.
      else.
        DO.
          READ DATASET P_file INTO WA .
          IF SY-SUBRC <> 0.
            EXIT.
          ENDIF.
          REPLACE ALL OCCURRENCES OF '"' IN WA WITH ''.
          CONDENSE WA NO-GAPS.
          SPLIT WA AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
          INTO wa_infile.
          append wa_infile to it_infile.
          clear wa_infile.
        ENDDO.
      endif.
    try this...
    vijay

  • How to use MERGE for this scenario?

    I am using oracle 10G and i need a help on using MERGE statement based on a condition.
    I have no values in table test_tab. So the below MERGE should insert the value, but it is not inserting the record. Please corret me if anything wrong with the below Query.
    MERGE INTO test_tab t
       USING (SELECT NO
                FROM test_tab) s
       ON (s.NO = 1)
       WHEN MATCHED THEN
          UPDATE
             SET t.str = 'EXIST'
       WHEN NOT MATCHED THEN
          INSERT (t.NO, t.str)
          VALUES (1, 'NOT_EXIST');

    MERGE INTO test_tab t
       USING  test_tab s
       on (t.no = 1 )
       WHEN MATCHED THEN
          UPDATE
             SET t.str = 'EXIST'
       WHEN NOT MATCHED THEN
          INSERT (t.NO, t.str)
          VALUES (1, 'NOT_EXIST');

  • How much of the RAW tonal range is conserved when using "Merge to HDR Pro"?

    Hello,
    I am wondering how much tonal range is saved when making a HDR image with Photoshop? I have three photographs with an EV diference of 3. I can combine them into one HDR file just fine, but I can't turn one of them into an HDR file. This has made me wonder the following. If Photoshop is unable to turn one RAW image into a 32-bit image, then how much range is lost in the conversion process? If I try to open a RAW file in Photoshop for saving into a EXR. file for instance then I notice that Photoshop simply turns my image into an ordinary 8-bit per channel image.
    I am using a camera with a very good CMOS sensor and the RAW data that my camera produces is of a very high tonal range. It would be a shame if Photoshop discards said range. This is a question that is very hard to Google since everyone that is using HDR is obsessed with tonemapping. I have to clarify that I don't care about tonemapping I just need the range. I would love to have an official Adobe employee answer some of my questions.
    So these are my questions:
    Why can't Photoshop turn a single RAW file into a 32-bit image by using HDR Pro?
    Does the fact that Photoshop can't turn a single RAW into a 32-bit image mean that all the range is lost when merging many RAW files?
    Does anyone know of a way to capture the full dynamic range of a single RAW image without using time consuming nonsense like virtual bracketing?
    If there is a way. How would you combine many 32-bit images into a single 32-bit image in order to maximize range.
    Why is no one else wondering about these things?

    I am looking forward to an anwer concerning the HDR preview-result-difference as well... Since some posts suggest to check out the color profile of the input files, i did so: they are both sRGB. And the immense change of saturation and brightness (in other examples even worse than below)  couldn't be explained by a different profile anyway, IMHO.
    working parameters:
    Adobe Brigde CS6 (Tools/Photoshop/HDR PRO)
    Adobe Photoshop CS6
    sRGB both input and output...

  • Copying and updating Data  from a table to new table using Merge command

    Hi ,
    Can anyone please tell me how to do this?
    I have a table : EMP(empno(pk),ename,sal,dept) another table is EMP_CLASS(empno(pk),ename)
    I want to insert corresponding rows from emp to emp_class table if that row does'nt exist in emp_class
    otherwise it will update corrsponding info in emp_class table as well as delete from emp_class according to emp delete operation.
    Thanks ,
    Deekay.
    Edited by: Deekay on Aug 12, 2010 10:59 PM

    Hi Vishu,
    This is really helpful, but I want little modification like it will check for deptno in emp and insert in class field if dept is 10 then 1 ,20 ,2 like wise. I have changed emp_class structure .Please find my updated code eaccording to that ,but I am getting error.
    MERGE
    INTO emp_class
    USING emp
    ON  (emp.empno = emp_class.empno)
    WHEN MATCHED
    THEN
    UPDATE
    SET emp_class.ename = emp.calss_name,
        emp_class.deptno = emp.deptno,
        emp_class.class=select decode(deptno,10,1,20,2,30,3,40,4)from emp
    DELETE
    WHERE emp_class.empno = emp.empno
    WHEN NOT MATCHED
    THEN
    INSERT (emp_class.empno,emp_class.name,emp_class.deptno,emp_class.class)
    VALUES (emp.empno,emp.name,emp.sal,emp.deptno,decode(deptno,10,1,20,2,30,3,40,4)emp.class);
        Please help me to fix this.
    this is the error:
    MERGE
    INTO emp_class
    USING emp
    ON (emp.empno = emp_class.empno)
    WHEN MATCHED
    THEN
    UPDATE
    SET emp_class.ename = emp.calss_name,
    emp_class.deptno = emp.deptno,
    emp_class.class=select decode(deptno,10,1,20,2,30,3,40,4)from emp
    DELETE
    WHERE emp_class.empno = emp.empno
    WHEN NOT MATCHED
    THEN
    INSERT (emp_class.empno,emp_class.name,emp_class.deptno,emp_class.class)
    VALUES (emp.empno,emp.name,emp.sal,emp.deptno,decode(deptno,10,1,20,2,30,3,40,4)emp.class);

  • How to use GB loops in Pro Tools

    I'm creating music and collaborating with someone who has Pro Tools but doesn't have Garage Band. My song was recorded into his Pro Tools software. I found a drum loop in my Garageband that I want to use with the song. How can I put it into his Pro Tools without losing any of the integrity of the audio?

    I appreciate your help. As you can guess, I am new to the Apple discussion groups.
    I tried unhiding files with Terminal, but that did not appear to help in this situation
    I did find an answer that suits me for the mean time.
    First  -  (to see loops)
    to see the Apple loops on my computer with Finder-
    -1 open Finder
    -2 Click on 'Go' icon at top of page
    -3 This brings drop down box
    -4 Click 'Go to Folder' and enter the following
           /Library/Audio/Apple Loops/Apple/Apple Loops for Garageband
    Second  - to get them into Final Cuty Pro X
    Create new folder in     /Library/Audio/Apple Loops/Apple
    called                         Apple Loops for Soundtrack Pro
    Now copy all files from    'Apple Loops for Garageband'
                               to       'Apple Loops for Soundtrack Pro'
    By creating the folder 'Apple Loops for Soundtrack Pro', it livens its existing link within Final Cut Pro X,
    so when you are in Final cut and go to the 'Music and Sound' icon you can now see the folder has changed from gray to blue, and you can see any files you copied into it.
    Cheers to all the help from others in trying to understand Finder.

  • How to use oraxml command-line in LINUX

    Hi:
    I gave the classpath for xmlparserv2.jar and try to excute some of the commands like
    %oraxml -help
    I got oraxml: command not found
    How can I use it?
    Please help
    ALI_02

    You can't.
    They are two totally different operating systems.

  • How to use  modify command?

    i want to modify table t_bseg which is used n BTE interface_00001050
    i want to modify only 1 specific line, how can i modify this line without using index because i get 0 when i use sy-tabix?
    ( i want to modify this line using the table keys ) .
    thanks

    Hi,
    MODIFY TABLE <itab> FROM <wa> [TRANSPORTING <f1> <f 2> ...].
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
    Regards
    Adil

  • How to use my Mac Book Pro as second Montior for my IMac?

    I have connected my Mac Book Pro via Thuderbold cable, to my IMac.
    Ho I can use my laptop as second screen ?
    Thanks,

    You can't.

Maybe you are looking for