Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I pipe the output of one isql to another?

isql output pipe
0
Posted

How do I pipe the output of one isql to another?

0

——————————————————————————- The following example queries sysdatabases and takes each database name and creates a string of the sort sp_helpdb dbname and sends the results to another isql. This is accomplished using bourne shell sh(1) and sed(1) to strip unwanted output (see Q4.2): #!/bin/sh PASSWD=yuk DSQUERY=GNARLY_HAIRBALL echo “$PASSWD print \”$PASSWD\” go select ‘sp_helpdb ‘ + name + char(10) + ‘go’ from sysdatabases go” | isql -U sa -S $DSQUERY -w 1000 | \ sed -e ‘/affected/d’ -e ‘/—/d’ -e ‘/Password:/d’ | \ isql -U sa -S $DSQUERY -w 1000 To help you understand this you may wish to comment out any series of pipes and see what output is being generated.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123