Skip to content Skip to sidebar Skip to footer
Showing posts with the label Tsql

Hierarchical Query Match With Multiple Tables Its Challenging

I have this business_table ref_ID name parent_id ----------------------------- ABC-0001 … Read more Hierarchical Query Match With Multiple Tables Its Challenging

Order Attribute Names In Xml Using T-sql

I need to order attribute names in alphabetic order and I've created following code, but it lef… Read more Order Attribute Names In Xml Using T-sql

Create A Binary String Of Zeros, With Variable Length

What is the most elegant way to create a string of binary zeros, of type varbinary(max), if the len… Read more Create A Binary String Of Zeros, With Variable Length

Higher Query Result With The Distinct Keyword?

Say I have a table with 100,000 User IDs (UserID is an int). When I run a query like SELECT COUNT(… Read more Higher Query Result With The Distinct Keyword?

Get Time From Getdate()

I would like to take the Getdate() results of, for example 2011-10-05 11:26:55.000 into 11:26:55… Read more Get Time From Getdate()

Is This A Problem In The Sp_rename Function Or Sql Server Itself?

While renaming the column name, the square bracket is included in the column name, which I think is… Read more Is This A Problem In The Sp_rename Function Or Sql Server Itself?