In Oracle sqlplus I always had a login.sql with statements like
column bldg_id format a8
which I could also use interactively on the sqlplus command line.
How can I do this in transact-sql ?
As far as I know, there is no equal command in SQL Server.But for simple format purpose, you can try -Y or -y parameter for sqlcmd.exe
For more info, pls try sqlcmd /?
Thanks,
Zuomin
|||
You can use BCP with format files, where you can control lot of options..
See BCP on BOL
|||Thank you both, but I'm just running the transact-sql available through Enterprise to SQL server, and I don't know what BCD is.
I learned I can do this:
oracle: col id format a8
transact-sql: select cast( id as char(8) )
John V. McCarthy
No comments:
Post a Comment