Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO SQL syntax query, using a variable
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 -- with kind regards Spike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO SQL syntax query, using a variable
Spike,
Try: "SELECT .... WHERE fund=" & Chr(34) & fundname & Chr(34) NickHK "Spike" wrote in message ... 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 -- with kind regards Spike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO SQL syntax query, using a variable
Works like a dream thank you so much
-- with kind regards Spike "NickHK" wrote: Spike, Try: "SELECT .... WHERE fund=" & Chr(34) & fundname & Chr(34) NickHK "Spike" wrote in message ... 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 -- with kind regards Spike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
syntax - range name as a variable | Excel Programming | |||
SQL query syntax | Excel Programming | |||
syntax for variable | Excel Programming | |||
DB query syntax | Excel Programming | |||
Syntax for variable search | Excel Programming |