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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding and removing only specified file in a table

Status
Not open for further replies.

aleathiel2005

Technical User
May 24, 2005
13
CA
Hi all,

Here is my problem:

I have a table with 6 field that are: SO_NO, SO_STATUS, CUST_CODE, REQUEST SHIP DATE, SHIPPING INSTR, QTY ORDERED

I want to delete the entire row only for the SO_NO that are finished (this is taken with the SO_STATUS while "4" is not finished, "9" is finished) and only add the one that aren't already in the table, is there a way to do that?

Right now I only have a query that delete everything and add all the list of what is in status 4.

Any help would be greatly appreciated, thanks.

Alea
 
I want to delete the entire row only for the SO_NO that are finished
DELETE FROM yourTable WHERE SO_STATUS = 9

only add the one that aren't already in the table
???
add from what ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Add the row where the SO_NO is in status 4 that aren't already in the table (the new pick ticket that was added today by exemple.
 
Sorry, but the crystal bowl is in vacation today and I'm not a mind reader.
Please, read carefully the second FAQ in my sig.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
ok, will try to explain more exactly, sorry sometime you think everything is easy to understand but it is in fact harder when you aren't in it :p

I have a query actually that take all the recent information and put it in a table.

Its list all the Sale Order No, the status for each one, the customer, is shipping date and the qty he ordered from an odbc pull.

This make a table in which I have a box to click which pick ticket I have in my possession, the thing is I want these box to stay click to yes until the pick ticket automatically became a status 9, which is completed. then goes the delete query that only delete those in status 9, but after that I need to add the new one that were created after the last update. So I would need a query that would add the new one, but can`t find a way to do it, i tough about something that would eventually pull all the status 4 but exempt the one that are already in the table.

Hope this help you better.

And thanks a lot for your help, its greatly appreciated :)

I really like the sentence you made:`"crystal bowl is in vacation today and I'm not a mind reader". Refreshing way to say it :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top