SQL Server's sqlcmd is truncating my columns returned, and increasing the size causes no result

為{幸葍}努か 提交于 2019-12-11 16:21:34

问题


I'm using SqlCMD in SQL Server to query my database from my linux machine using the following bash code:

RESULT=`/opt/mssql-tools/bin/sqlcmd -S thedb.server.database.windows.net -d db_123 -U user_123 -P pass_123 -y 50 -Y 50 -I -Q "$SQL_QUERY" -s"|"`

This returns the each column up to 50 characters per column. However, some of my columns go up to 1000 chars in length, and when I include the "-y" and the "-Y" setting, it works up until about 80, then no result.

I've reviewed Microsoft's docs here but that didn't get help. Thank you

来源:https://stackoverflow.com/questions/57015860/sql-servers-sqlcmd-is-truncating-my-columns-returned-and-increasing-the-size-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!