Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

store proc.

Status
Not open for further replies.

dvraggs

Technical User
Jan 30, 2002
22
0
0
US
I'm new to databases, I wanted to known if there is away to create a store proc. that will look at a list table and compare the Order_IDs on this table with new query like this 'give me all order_ids that are not in this table' then fill another table with the results then update the list table. This way I can never pull the same order_ids.
Any help would be great. I do this mannualy with excel.
 
I think something like

Code:
INSERT INTO other_table (order_id)
SELECT order_id FROM order_table
 MINUS 
SELECT order_id FROM list_table;

would take care of the first part. It will insert any order_id numbers that are in your order table but not in your list table. I'm not sure what you want to update your order table to, so I can't help you there!

If I have your requirements wrong, please expand and we can help you with this.

Elbert, CO
0833 MDT
 
thanks what I do with that is keep up to date list of what I have printed Order IDs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top