First, am in the correct users group?
I have code in vb6, ADODB and SAOLEDB connections,
select statement ; output to filename.txt format ascii
this is the code that works in ISQL, and will work in vb with OUT the "output to filename" but when the output to is there I get this error: Syntax error near 'OUTPUT' online 1.
Here is the code:
All help appreciated. thanks
sqlTM = "SELECT CUSTOMER.NAME,CUSTOMER.CUCD, CUSTOMER.APAR,ADDRESS1,ADDRESS2,CITY,STATE, ZIP,EMAIL,HINVOICE.INVOICE,HINVOICE.NOTAXABLE, HINVOICE.TAXABLE,INVDATE, CAST(sum(HINVOICE.NOTAXABLE + HINVOICE.TAXABLE) AS CHAR) INVTOTAL FROM HINVOICE JOIN CUSTOMER ON HINVOICE.CUCD = CUSTOMER.CUCD WHERE CUSTOMER.EMail Like '" & EMail & "' AND CUSTOMER.APAR LIKE 'AR' AND (HINVOICE.INVDATE >= '" & StartDate & "' AND HINVOICE.INVDATE < '" & Enddate & "') and " ((HINVOICE.NOTAXABLE > '" & LowDollars & "' and HINVOICE.TAXABLE > '" & LowDollars & "') and (HINVOICE.TAXABLE < '" & HighDollars & "' and HINVOICE.TAXABLE < '" & HighDollars & "'))" " GROUP BY HINVOICE.CUCD,INVOICE,OTAXABLE,HINVOICE.TAXABLE,NAME,ADDRESS1,ADDRESS2,CITY,STATE, ZIP,EMAIL,INVDATE,CUSTOMER.APAR,CUSTOMER.CUCD; OUTPUT TO 'C:\EmailList.txt'"
OUTPUT is an ISQL statement, it is not a SQL statement supported by the server.
You can use the UNLOAD SELECT statement to output the result set of a SELECT statement into a flat file.
answered 27 Apr '12, 16:36
Is there an easy way to turn off the banner that comes up when doing the unload ? It is the banner of the db engine starting. I do not have a daemon or service running.
I was looking to do a "shell" command to either start it or some how turn off the banner.
answered 27 Apr '12, 18:18