|
-
Jun 29th, 1999, 09:50 PM
#1
Thread Starter
New Member
I have a database with two tables. I need to update one with and agency name. The other holds the agency names and ID numbers. How do I search the second table by ID number and to update the agency field in the first table? I tried this
strCriteria = "SELECT Agency_Name FROM Identification WHERE ACH_ID = "'" & IDNUM "'" '
But it doesn't work. I know little about SQL I am just trying it out. What am I doing wrong? Also, please be clear about the ' and " because it is hard to see them on the message board.
-
Jun 29th, 1999, 10:44 PM
#2
Lively Member
What error are you getting with this?
Bash
-
Jun 30th, 1999, 11:35 AM
#3
New Member
The SQL should read as follows:
strCriteria = "SELECT Agency_Name FROM Identification
WHERE ACH_ID = '" & IDNUM & "'"
OR
strCriteria = "SELECT Agency_Name FROM Identification WHERE ACH_ID = " & IDNUM
Either one of these should work.
Hope this helps
David Ridgway
[email protected]
-
Jun 30th, 1999, 11:38 AM
#4
New Member
I'll re-send the reply and space out the one that uses ' and "".
strCriteria = "SELECT Agency_Name
FROM Identification
WHERE ACH_ID = ' " & IDNUM & " ' "
Hope this helps
David Ridgway
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|