Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Storing a script into a CSV file-STORE error

I currently run a script in QV (snippet here) an it runs properly.  Once I try to add a STORE step, I get an error.  Can someone help me figure out what the correct syntax is supposed to be?

ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Incorrect syntax near 'STORE'.

Here is the script:

SNF_ALOS:
SELECT DISTINCT

                      Select1,
                      Select2,
                      Select3,

FROM                  Table

WHERE                Condition

STORE SNF_ALOS into V:\Senior Products - Finance\SER Analysts\Clinical Analyst\Monthly Leadership Reports\SNF_ALOS\monthly_SNF_ALOS.csv(txt);
DROP Table SNF_ALOS;

Thank you!

1 Solution

Accepted Solutions
Kushal_Chawda

missing ";" after where

View solution in original post

4 Replies
Kushal_Chawda

missing ";" after where

Colin-Albert

Your file name & path contain spaces so you need to enclose the name in square brackets.

STORE SNF_ALOS into (txt);

Colin-Albert

And the missing semi-colon as identified by Kush.

Not applicable
Author

Both are correct, thank you so much!