Viewing 15 posts - 1,126 through 1,140 (of 1,923 total)
If your input is as what Chris Morris said, then this would help you
DECLARE @CSV VARCHAR(100)
SELECT @CSV = '1,2,3,4,5'
SELECT x.i.value('(./text())[1]','INT') AS IDs
FROM (
SELECT...
September 20, 2010 at 10:24 am
Ok, take this:
select ValueOfCols from
(
SELECT 1 col1, 2 col2, 3 col3, 4 col4, 5 col5
) Pivot_Table
UNPIVOT
(
ValueOfCols FOR Cols IN ([col1],[col2],[col3],[col4],[col5])
) Pivot_Hanle
September 20, 2010 at 10:20 am
Take a gander at the first post of this thread: http://www.sqlservercentral.com/Forums/Topic988784-391-1.aspx
September 20, 2010 at 9:37 am
Why would xyz come to 2 and abcde be at 1 ?
September 20, 2010 at 9:33 am
WebTechie38 (9/20/2010)
I am so blown away. Thank you.
It is going to take me a bit to go through this. I would say pretty advanced coding here.
Some of the...
September 20, 2010 at 9:33 am
Chris Morris-439714 (9/20/2010)
keith-710920 (9/20/2010)
September 20, 2010 at 9:16 am
Jeff, here is my test results for the AdventureWorks JOIN query you asked to give results for. this is run in my slowest environment (Env2)
September 20, 2010 at 9:07 am
Hi there, your request made me sweat for 2 hrs 😉
Take this, this will allocate the employees your boss chose in replacement of the departing employee.. this maintains randomness ;...
September 20, 2010 at 9:06 am
This seems to be a good challenge, but dint provide us any sample data to get started readily.. Hmmm.. i take it on mine, and here are the sample data...
September 20, 2010 at 7:45 am
How would you identify the employees to whom the guests-of-parting-employee will be handed ? Is there an algorithm for that? Say if Employee ID 1 quits, how will u finalize...
September 20, 2010 at 4:36 am
Will, why not try BCP for pulling data into a text file ?? using that you can control the NCHAR or VCHAR character sets...
September 20, 2010 at 3:20 am
WRACK (9/20/2010)
Thanks Craig and ColdCoffee
Our pleasure, WRACK..One more thing i want to add is, just look at how Craig set up the base for others to work on with his...
September 20, 2010 at 2:23 am
How about this :
Thanks Craig for the wonderful test-setup..
DECLARE @COLS VARCHAR(MAX);
DECLARE @SQL_CASE_STMT VARCHAR(MAX);
DECLARE @SQL_FINAL ...
September 20, 2010 at 12:26 am
Jeff, here are the other 3 environment's results (Note : This result set is not the results of the AdventureWorks JOIN code test rig ; this is of the first...
September 19, 2010 at 11:10 pm
Jeff, this is from environment 2..
~Edit : all my tests will be over the desktop machines, i dont have laptop yet, Jeff.. Rest of the eonvironments, i will give u...
September 19, 2010 at 9:34 am
Viewing 15 posts - 1,126 through 1,140 (of 1,923 total)