Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

SQLCMD Mode vs SQLCMD command line Utility

$
0
0

I noticed some strange behavior with column ordering on a view.  When I run the below script using SQLCMD Mode in SSMS, the columns show in the correct order.  If I run the same command using the SQLCMD command line utility, the view's columns get put in ABC order.

CREATE VIEW [dbo].[SomeView] WITH SCHEMABINDING AS

SELECT ACol, QCol, BCol, DCol FROM dbo.SomeTable

I saw in MSDN that the command line utility runs the SQL using ODBC vs the SQLCMD mode uses SQLClient framework but I'm not able to find any information on the differences.  Anyone else experience this behavior?




Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>