A
Arvid Qvigstad
How do you get MS Excel to accept an SQL query that spans
multiple lines? If I put the query on a single line, it
runs. If I split it to multiple lines, Excel only read
the first line, then gives an error like "Missing
expression" or "no FROM statement found", etc.
Here is how I would like to write the query:
SELECT CompanyName, ContactName
FROM customers
WHERE CompanyName > 'g'
AND ContactName > 'g'
Here is how Excel expects it:
SELECT CompanyName, ContactName FROM customers WHERE
CompanyName > 'g' AND ContactName > 'g'
I have a long query and Excel splits it to 2 lines, then
gives and error because it can't find the 2nd line.
multiple lines? If I put the query on a single line, it
runs. If I split it to multiple lines, Excel only read
the first line, then gives an error like "Missing
expression" or "no FROM statement found", etc.
Here is how I would like to write the query:
SELECT CompanyName, ContactName
FROM customers
WHERE CompanyName > 'g'
AND ContactName > 'g'
Here is how Excel expects it:
SELECT CompanyName, ContactName FROM customers WHERE
CompanyName > 'g' AND ContactName > 'g'
I have a long query and Excel splits it to 2 lines, then
gives and error because it can't find the 2nd line.