on 2012 Apr 27 5:06 PM
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'"
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Any suggestions?
thanks again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look in the help under "quiet mode".
Operating quietly The database server supports quiet mode. You determine how quiet you want the server to operate, ranging from suppressing messages or the icon in the system tray, to complete silence. To operate a completely silent database server on Windows, specify the -qi, -qs, and -qw options. With these options set, there is no visual indication that the server is running as all icons and all possible startup error messages are suppressed. If you run the database server in quiet mode, you can use either (or both) the -o or -oe options to diagnose errors.
The -qi and -qs options do not suppress windows caused by the -v (version) and -ep (prompt for database encryption password) server options. See:
-qi dbeng12/dbsrv12 server option -qn dbeng12/dbsrv12 server option -qs dbeng12/dbsrv12 server option -qw dbeng12/dbsrv12 server option
User | Count |
---|---|
46 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.