Thank you Rabbit.
To make it work I created a procedure that will extract the data into text file and I created this scheduled batch file to print the file.
Now, my next problem is how to tell inside my sql extract to file procedure to print it in new page for each record. See my code below. I use the combination of CHAR(13) + CHAR(10)
to go to the next line. What about page break or new page? Is there an ascii code that will tell to go to the next page?
-
DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10)
-
-
SELECT
-
'DATE:'+getdate()+ @NewLineChar
-
+'Customer Name:'+last_name+', '+first_name + NewLineChar
-
+'Customer Record Number:'+rec_nbr + @NewLineChar
-
FROM Tbl_customer
-