Tag Archives: sql

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

File management from inside SQL code

Writing a log, dumping data, looking for file to be used in Bulk insert… There are many situations when you would want to have access to files from inside your SQL code on Microsoft SQL Server. Did you know that you … Continue reading

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

SQL date operations: First day, Last day of the month…

Did you ever faced a situation when you need quickly calculate some boundaries of the Date value like First Day of the month, Last Day of the month, etc… in T-SQL? Colegue of mine asked me this question… WOW! What do … Continue reading

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