Asked on 2004-09-01 at 08:19:41ID: 25476806

Merge Statement to merge variables with table

by: atlvandyguy250

Rating8.8Very Good

I know typically that when using a Merge statement, one is merging the values of one table into another.  In my case, i have the current values I want to determine if I need to insert or update but they are in variables, and not a table.  How do I use the Merge statement when right after my USING I would like to put my variables rather than a SELECT statement?

  1. Temporary tables usage in select statement
    Hi, I have created a global temporary table. In the stored proc, I have defined a cursor on the temp table. After that i am inserting data into the temp table. Then i am opening the cursor, fetching values from the cursor. Then i am using the fetched data from cursor in teh where clause of a select statement of a normal table. But i am getting error …
  2. Update Statement with two tables
    Trying to do an update based on to tables. The update runs forever. the first is the select statement that runs within 15ms. When I add the update the statement runs and runs but I would not think that it would run longer than 2 hours so I killed the execution. cust_ord_customer_tab has 1913 records cust_ord_customer_address_tab…
    NOT SURE WHY CASE STATEMENT IS NOT WORKING...WHAT AM I MISSING? and case when :PATIENT_TYPE = 'DP' then 'and PLOC.transfer_reason in (40, 41, 42)' when :PATIENT_TYPE = 'NDP' then ' and PLOC.transfer_reason not in (40,41,42) ' when :PATIENT_TY…
  4. Using a While Statement to Store a sum Variable i…
    What I'm trying to do here is get a yeartodate total using a stored procedure. My parameters are @STARTDATE AND @ENDDATE. The field I'm using is beginv, The issue is that I only what the money from the 1st day of each month, depending on what the user picks as the data range. Example 4/1/2009 through 4/30/20…
  5. When to use '/'?
    I have a statement to create indexes: create index1 ...; create index2 ...; / And I had problem in the deployment. When I remove the "/", everything is good now. So my question is when to use "/" and when not? Thanks.


Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
merge variables
Participating Experts
Solution Grade


 by: vik_neo

Posted on 2004-09-01 at 08:41:35ID: 28338950

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.


Posted on 2004-09-01 at 16:19:47ID: 28338951

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts


slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv


A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber


What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv


    0 points yesterday


BrowseBecome an Expert