The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-22-2009
siquadri siquadri is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 44
Isql Data format

I am using the following script
Code:
#!/bin/ksh
/usr/sybase/bin/isql -SXYZ   -UABC  -PXYZ -b <<EOF >temp
select A.host,A.server,B.db,A.status from dbo.server as A,dbo.db as B where A.product in (XX,YY) and A.server=B.server
go
EOF

Result:
Results:
host1 server1
database1 5
host2 server2
database2 5
host3 server3
database3 5

wanted Results:
Requried Result
host1 server1 database1 5
host2 server2 database2 5
host3 server3 database3 5

Thanks in advance