Hi,
I was wondering if there's a way to check an existing id in the main table when using temporary table,then use another id for inserting records.Since it may cause error for using the same id in the main table.
Is there a way to do that?
Nebil
5
Junior Poster
Recommended Answers
Jump to PostTry doing a
SELECT COUNT(*)
on the record with that ID. If you get a result of 0 then the record does not exist.
Jump to PostI don't believe the first query will do anything. The syntax is
WHERE [SOMEVALUE] NOT IN (LIST OF VALUES)
however your syntax is
WHERE [SOMEVALUE] NOT IN (RECORDSET)
What exactly are you trying to do? The second query should work but because …
All 7 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Nebil
5
Junior Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Nebil
5
Junior Poster
Nebil
5
Junior Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Nebil
5
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.