Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    Posts
    16

    Unanswered: print Go in NEw line through Isql command

    i have to print Go statement in new line through isql command
    my isql command is
    isql /Q -SServername -dDatabasename -Usa -PPassword -h-1 -n -q "set nocount on Select ' grant execute on ' + name + ' to user go ' from sysobjects where type = 'U' and name not like 'dt%'" -o SFGRants.sql >> Deploy.log

    and out is like
    select grant execute tablename to user go

    but i want in different format like
    select grant execute tablename to user
    go

    like that
    thanking in anticipation

  2. #2
    Join Date
    Aug 2006
    Posts
    16
    USe char(13)
    isql /Q -SServername -dDatabasename -Usa -PPassword -h-1 -n -q "set nocount on Select ' grant execute on ' + name + ' to user' + char(13)+' go ' from sysobjects where type = 'U' and name not like 'dt%'" -o SFGRants.sql >> Deploy.log

    When u paste the output of the this commands output to query analyzer GO will print in separate line

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •