Print out loop index on the console after executing each sybase DB query

Hello Guys,

Well, using shell script, I'm doing loop on DB query as below:

isql -Usa -Ptest -I /opt/sybase/interfaces << EOF
use testdb
go
declare @i int
select @i = 1
while(@i <= 5)
begin
Insert into TEST values (@i,"Test","TestDesc")
select @i = @i + 1
end
go
EOF

The Issue here, that i want to print out the index on the console for each loop after the insertion has been done, or redirect the indexs to a file.

Ex: echo "Row @i has been inserted"

But i tried to put this echo after the insertion, but gave me error, any advice !!!!

Tha idea behind that, i want to know what indexes have been inserted successfully !!!

Thanks,

  • Ala'eddin

Hey Guys, any Advice please .... !!!!

Hey Guys, please help in That .... !!!