-
Let's say I have this in an access recordset (DAO 3.51):
Code:
'ID Name Last Name
'
'0 Robert Point
'1 Mark Stuff
'1 Dicky Other stuff
'2 Freako Yaddayadda
'2 Gulp Packa
'2 Spoofy Blahblah
'3 Frank Click
'4 Shrink Doubleclick
And let's say I want to pull out all the names with '2' as ID. What's the SQL statement to do that?
-
SELECT Name, LastName
FROM TableName
WHERE ID = '2'
-
And what if the table name has spaces in it?
Shoud I use:
SELECT Name, LastName FROM "Table Name" WHERE ID = 2
?
-
SELECT Name, LastName
FROM [Table Name]
WHERE ID = '2'
-
-
Problem :(
It only returns the first record with the specified ID.
What's wrong? :(
-
If you're using a recordset, you'll need to read (movenext) the next record in it...