Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 The Yak Corral
 Spoon Feeding

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.
Go to Top of Page

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"
Go to Top of Page

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
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-06 : 09:24:03
I'll try again.

Strong
Emphasized
Accented
Stressed

Am I getting close?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

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
Go to Top of Page

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]

Go to Top of Page

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 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-08-06 : 12:16:36
I quite like the..

quote:

it says
1 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
Go to Top of Page

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 #tablea

CREATE TABLE #tablea (
cal INT
, name VARCHAR(50)
, score INT
)

INSERT INTO #tablea
SELECT 1, 'Michael', 89
UNION SELECT 2, 'Lyka', 90
UNION SELECT 1, 'Mark', 78
UNION SELECT 1, 'Lyka', 98
UNION SELECT 2, 'Mark', 78
UNION SELECT 2, 'Prince', 89
UNION SELECT 3, 'Prince', 90
UNION SELECT 3, 'Lyka', 78
UNION SELECT 3, 'Mark', 98

SELECT * FROM #tablea

DECLARE @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) names

SET @sql = @sql + '
FROM
#tablea
GROUP 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
Go to Top of Page

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
Go to Top of Page

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]

Go to Top of Page

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
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-08-07 : 12:08:39
don't touch my swingline stapler...


elsasoft.org
Go to Top of Page

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 Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

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
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-11 : 09:12:52
And Cutiebo2t is on the prawl again
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=108571


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

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]

Go to Top of Page

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.
Go to Top of Page

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
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-14 : 05:09:00
Here you go khtan!
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=108815



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
    Next Page

- Advertisement -