Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print function problems

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all,

I'm trying to write a script to extract the DDL for a trigger, given the table name.

The main problem I encounter is with the print function. First to replace the char(10), (I think I solved this with the stuff function) but now I'm trying to print lines containing the "%" char, that SQL understand as a formatting for the print and mess it all up.

Any suggestion?


Thanks,
Roberto

 
Hi,
I solved this issue by using a temp table and inserting row by row into that table and at the end, selecting the whole of it or in my case, doing a bcp out to a file.
Thus to avoid the print.

Regards,
Roberto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top