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'" asked 27 Apr '12, 16:06 George Volker Barth |
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 Glenn Paulley Yah, I just found it about 5 minutes ago, it does close the record set before I can get a count, but I can live with out that.... thanks so much, the number of hours I have in to this is SHAMEFULL!!!! thanks again. just an fyi, it does work with the case, groupby, etc,
(27 Apr '12, 16:39)
George
Here is what I use for a global env. gblADOProvider = "SAOLEDB" & " ;Data Source=AutoTireTech" & " ;User = EXT ; Password = ext" I would love to see a sample of how to connect with out the ODBC Data Source and to set the dbengine in quiet mode (no displays) Am I asking too much?
(27 Apr '12, 18:41)
George
|
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 answered 27 Apr '12, 18:18 George 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
(27 Apr '12, 19:03)
Glenn Paulley
I have done the options, but one at a time.. thanks so much. I just did not conclude they were all needed at once. Live and learn thanks
(27 Apr '12, 19:25)
George
|
Hi George, feel free to ask whatever you like:)
FWIW, I have turned some of your "answers" into comments as they seem to be more like further questions than real answers. This forum allows to istinguish both, you can comment on questions/answers by the "add new comment" button below each posting.
Thank you, I am still learning Sybase. Not knowing that the commands exist, is the biggest problem. Again, thanks. Hopefully, this is done correctly.
Well, there no "wrong way" here - we like to help and get help, that's the single important point to know:)