OSQL

  • Hi There

     

    When I use this osql,

     

     

    some stuff....

     

    set @sql ='osql -Q"set fmtonly off; exec dbo.Mywrapper '+cast(@i as nvarchar)+'" -o"D:\Temp\' + cast(@i as varchar) + '.txt" -s ";" -n -w8000 -E -S"'+@@servername+'" -d"'+db_name()+'"'

     

    I get something like this,

     

    AreaNumber;Year;Totals;M60-64C;M60-64E;M60-64F;M60-64G;M60-64L;M60-64O;M60-64P;M60-64U

    ----------;-------;------;-------;-------;-------;-------;-------;-------;-------;-------

    100       ;1979   ;116428;0      ;1197   ;2427   ;13550  ;0      ;0      ;0      ;1531  

    100       ;1980   ;117251;0      ;1076   ;2367   ;12774  ;0      ;0      ;0      ;1463  

    100       ;1981   ;118872;0      ;1050   ;2406   ;12576  ;0      ;0      ;0      ;1505  

    100       ;1982   ;120818;0      ;1073   ;2417   ;12130  ;0      ;0      ;0      ;1487  

    100       ;1983   ;122584;0      ;1066   ;2476   ;11586  ;0      ;0      ;0      ;1518  

    100       ;1984   ;124292;0      ;1032   ;2433   ;11009  ;0      ;0      ;0      ;1530  

    Is it possible to remove the spaces? I need the header so -h-1 is not good.

     

    Thanks in advance

     

    Joejoe

  • This was removed by the editor as SPAM

  • Use ISQLW with -C option.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply