Help with a SELECT

G

Guest

Hi, I have some troubles trying to put the semicolon """ to
((tblComputers.AssetTag) = (tvwcomputers.AssetTag)) both are text and the
full select is:

sql = "SELECT tblComputers.AssetTag, tblComputers.ManufacturerID,
tblComputers.DateReceived, " & _
"tblComputers.PurchasePrice, tblComputers.Warranty, tblComputers.EmployeeID
" & _
"FROM tblComputers INNER JOIN tvwComputers ON tblComputers.AssetTag =
tvwComputers.AssetTag " & _
"WHERE " & ((tblComputers.AssetTag) = (tvwcomputers.AssetTag))


Thanks
 
R

Rob Parker

Hi Orlando,

I don't understand why you have the WHERE clause in your SQL string - it's
exactly what the INNER JOIN is doing. All you need is:

sql = "SELECT tblComputers.AssetTag, tblComputers.ManufacturerID,
tblComputers.DateReceived, " & _
"tblComputers.PurchasePrice, tblComputers.Warranty, tblComputers.EmployeeID
" & _
"FROM tblComputers INNER JOIN tvwComputers ON tblComputers.AssetTag =
tvwComputers.AssetTag;"

Note the closing semicolon in the last substring.

HTH,

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top