Piotr Rodak

if datepart(dw, getdate()) in (6, 7)
use pubs;

Browse by Tags

All Tags » t-sql (RSS)
a question
Boss told you to come up with a question to test new programmers? Here's one: you have a linked server and an openquery statement. What is the number returned by this query? select count(*) from openquery(LINKED_SQL, 'select count(*) from database.dbo...

Posted by Piotr Rodak | with no comments

changing collation of all columns without dropping them
Just this week I had opportunity to change collation of all objects using it in a database without dropping it. I like to computers to do what computers should do - work that is :). So I created a query that gave me script changing collation of all columns...

Posted by Piotr Rodak | 1 comment(s)

csv list of elements as parameter for stored procedure
A while ago, Tony Rogerson showed a way how to pass a list of integers (csv) to stored procedure. Approach of creating a script and executing it is OK for smaller amounts of data. I thought, that maybe, as xml is a form of text after all, it would be...

Posted by Piotr Rodak | 1 comment(s)

Filed under: ,