ADO SQL syntax query, using a variable

S

Spike

I need to extract data from a csv file for a specific fund, i have the syntax
to do this by coding the fund name into the SQL string, but what is the SQL
statement syntax to use if you wish to use a variable to hold the fund name.
So instead of ....WHERE fund = 'XYZ'. i have tried WHERE fund= fundname.
Fundname being the variable holding the fund name. This produces an error.

I will be very grateful for any help in this
 
S

Spike

Works like a dream thank you so much
--
with kind regards

Spike


NickHK said:
Spike,
Try:
"SELECT .... WHERE fund=" & Chr(34) & fundname & Chr(34)

NickHK
 

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