Re: SQL NEWBEE QUESTION
- From: "Richard Wakeman" <jrw16@xxxxxxxxxxxx>
- Date: Sun, 29 Oct 2006 11:02:09 -0800
Thanks for the help! To answer your question, yes, the code NOW does update
the History table when the main record is deleted. I needed a routine to go
back into all the thousands of history records that were created incorrectly
before.
Thanks again!!
"Marc Rohloff" <marcrohloff_ng@xxxxxxxxxxx> wrote in message
news:1161959275.930303.238790@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Richard Wakeman wrote:
What I need to have happen is to have a quick way (SQL) to go thru theShouldn't you rather have your code update the history table when the
History table, and replace some data into a History Table Field based
upon
whether that History records's counter part in the Main Table has been
deleted (not there anymore). We still want to keep History Records of
those
deleted in the Main. Am I making any sense?
main record is deleted?
Anyway, the SQL code for it would be something like:
UPDATE HISTORY.DBF SET HDUPNUM = "1" INNER JOIN MAIN ------- and here I
get lost....
Normally it is something like:
UPDATE HISTORY SET HDUPNUM="1"
WHERE HISTORY.KEY NOT IN (SELECT MAIN.KEY FROM MAIN)
--
Marc
.
- References:
- SQL NEWBEE QUESTION
- From: Richard Wakeman
- Re: SQL NEWBEE QUESTION
- From: Marc Rohloff
- SQL NEWBEE QUESTION
- Prev by Date: Windows File Association to a bds personality
- Next by Date: how to enter binary number in Delphi
- Previous by thread: Re: SQL NEWBEE QUESTION
- Next by thread: Re: SQL NEWBEE QUESTION
- Index(es):
Relevant Pages
|