Browse by Tags

All Tags » SQL (RSS)

Querying Active Directory from SQL Server 2005 by bunbun

Querying Active Directory from .NET code is pretty easy and straightforward. Doing the same from SQL Server is not too difficult but there is one glaring issue in my opinion - your result set is limited to 1,000 records. For a small company this may be...
Filed under: ,

Using a linked server in a stored proc job by bunbun

Working on a new stored proc, I encountered an error when trying to run a job that called the stored proc. The error message was: Executed as user: NT AUTHORITY\SYSTEM. The OLE DB provider "SQLNCLI" for linked server "costpoint_rw" reported an error....
Filed under: ,

Padding in SQL (Replicate Command) by bunbun

In .NET there are nice functions for padding like PadLeft and PadRight. Found out SQL has its own: the replicate command. You pass a string (the value you want to pad) and then an integer value for how many occurences you want. Combine that command with...
Filed under:
More Posts