Tag Archives: sql server

Tip: Get list of columns for the table

When you dealing with dynamic SQL or unknown table structure, SQL meta data could help recover the missing information. There are two main system tables which give you such information: dbo.sysobjects dbo.syscolumns Example below shows how to gather column list … Continue reading

Posted in Fun stuff with SQL Server | Tagged , , , | Leave a comment

SQL date operations: Last 90 days, Get Date from DateTime…

I am continuing putting some common examples of operations for Microsoft SQL Server. In addition to some of the Date related code snippets published before, there are few more today:

Posted in Fun stuff with SQL Server | Tagged , , | Leave a comment

SQL Server Collation. An enemy or a friend?

Is SQL Server Collation setting your enemy or your friend? How to change server default collation? In general, it is your friend, it will help SQL Server to figure out how to store character strings in different locale. It becomes … Continue reading

Posted in Fun stuff with SQL Server | Tagged , , , | 6 Comments

Load text file data into SQL Server table

Last time we have seen how to manipulate text files from SQL Server code using Scripting object. This time we would look at “Read File As Table” operation from a different angle – using BULK INSERT operation. There are pros and … Continue reading

Posted in Fun stuff with SQL Server | Tagged , , | Leave a comment