Solved

help with query

Posted on 2013-06-07
3
273 Views
Last Modified: 2013-06-07
you experts hi all
please help with!!

INSERT INTO suplementos (numdeord,rev)SELECT  distinct (odc.numdeord, odc.rev) FROM odc LEFT JOIN suplementos ON odc.numdeord=suplementos.numdeord and odc.rev=suplementos.rev WHERE suplementos.numdeord IS NULL and suplementos.rev is null"

tsm
0
Comment
Question by:edo60
3 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 39229853
what is the issue?
0
 
LVL 40

Accepted Solution

by:
Sharath earned 500 total points
ID: 39229861
Do you mean this?
INSERT INTO suplementos 
            (numdeord,rev) 
SELECT DISTINCT odc.numdeord,odc.rev 
FROM   odc 
       LEFT JOIN suplementos 
              ON odc.numdeord = suplementos.numdeord 
                 AND odc.rev = suplementos.rev 
WHERE  suplementos.numdeord IS NULL 
       AND suplementos.rev IS NULL 

Open in new window

0
 

Author Closing Comment

by:edo60
ID: 39229866
tsm!!!
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now