Author |
Topic |
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-08-06 : 07:26:42
|
Open your mouth . . . Yes . . that's it . . . bigger . . . bigger . . . yes . . . like this If you look through all his/her thread, this guy really expect one.  KH[spoiler]Time is always against us[/spoiler] |
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-08-06 : 09:05:35
|
It's really annoying when they bump their threads multiple times a day. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-06 : 09:06:17
|
Leave that one to Elancaster.I think she has a special feeling for him. E 12°55'05.25"N 56°04'39.16" |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-08-06 : 09:09:29
|
special is not quite the word i'd use Em |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-06 : 09:24:03
|
I'll try again.StrongEmphasizedAccentedStressedAm I getting close?  E 12°55'05.25"N 56°04'39.16" |
 |
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-08-06 : 09:28:18
|
seeing as how i'm SO ladylike... yeah they'll do Em |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-08-06 : 12:04:25
|
quote: what should I do next to get the proper results?what's the next step?
Oooooh . . I am stressed, my BP just went up to 150/100  KH[spoiler]Time is always against us[/spoiler] |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-08-06 : 12:06:53
|
why oh why? i just laughed with no BP increase what so ever _______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
 |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-08-06 : 12:16:36
|
I quite like the..quote: it says1 row affected by last query.
......quote: what's that means?
part. If he's not going to read and understand his own servers queries return messages you can't teach him.-------------Charlie |
 |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-08-06 : 12:44:38
|
But to be fair to the guy, doing this dynamically has some gotchas.IF object_Id('tempdb..#tablea') IS NOT NULL DROP TABLE #tableaCREATE TABLE #tablea ( cal INT , name VARCHAR(50) , score INT )INSERT INTO #tablea SELECT 1, 'Michael', 89UNION SELECT 2, 'Lyka', 90UNION SELECT 1, 'Mark', 78UNION SELECT 1, 'Lyka', 98UNION SELECT 2, 'Mark', 78UNION SELECT 2, 'Prince', 89UNION SELECT 3, 'Prince', 90UNION SELECT 3, 'Lyka', 78UNION SELECT 3, 'Mark', 98SELECT * FROM #tableaDECLARE @sql NVARCHAR(4000)SET @sql = 'SELECT [cal]'SELECT @sql = @sql + ' , SUM(CASE WHEN [name] = ''' + [name] + ''' THEN [score] ELSE 0 END) AS [' + [name] + ']'FROM (SELECT DISTINCT [name] FROM #tablea) namesSET @sql = @sql + 'FROM #tableaGROUP BY [cal]'EXEC sp_executeSql @sql For some reason you cant do a SELECT DISTINCT @sql = @sql + ' , SUM(CASE WHEN [name] = ''' + [name] + ''' THEN [score] ELSE 0 END) AS [' + [name] + ']'FROM #tablea or you just get 1 person, not everone.-------------Charlie |
 |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-08-06 : 12:45:31
|
But he's still not helping himself... so why should we?-------------Charlie |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-08-06 : 21:51:12
|
quote: Originally posted by Transact Charlie But he's still not helping himself... so why should we?-------------Charlie
Yes. Totally agreed !  KH[spoiler]Time is always against us[/spoiler] |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2008-08-07 : 11:26:49
|
That thread reminds me of a guy I worked with who talked to himself all day. Took me a while to realize he wasn't talking to me and just treat it like background noise.If you did make the mistake of talking to him, the only way to end the conversation was by physically leaving the area.CODO ERGO SUM |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2008-08-07 : 12:08:39
|
don't touch my swingline stapler... elsasoft.org |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-08-07 : 13:03:02
|
I used to work with a guy who was a functioning schizophrenic. He talked to himself constantly all day, ate his boogers in front of everyone, rarely showered, ... They pretty much can't get rid of him due to his knowledge of the systems that he supports. He's still there, but luckily I moved on a few years back. His lack of showering would get so bad that holes would develop in his sweaters in the arm pit region. His manager had to have an uncomfortable talk with him one day to let him know his hygiene was a problem and not to wear that sweater anymore. On phone calls and in important big meetings, he would suddenly be a normal guy. Apparently before we moved buildings away from downtown, he used to scream at the passing train and do a dance. I never witnessed it, but a few people told me the stories. Those were the days...Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2008-08-07 : 16:10:21
|
Bet he got a lot of sweaters and underwear for birthday and Christmas presents."Um, we need you to move to the basement."CODO ERGO SUM |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-08-11 : 09:22:02
|
I am staying out of this  KH[spoiler]Time is always against us[/spoiler] |
 |
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-08-11 : 11:32:05
|
God I hope I don't end up on this thread or the twit list. I ask a lot of questions, but I'm not intending to be spoon fed. |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2008-08-11 : 11:58:57
|
you just posted to the thread, so you are on it now!  elsasoft.org |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
Next Page
|