SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 The Yak Corral
 Twit List
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 88

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 07/23/2007 :  09:37:29  Show Profile  Reply with Quote
quote:
Originally posted by tkizer

A DBA who doesn't know what his/her job entails: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=86542

Tara Kizer
http://weblogs.sqlteam.com/tarad/



Apparently, his job responsibility includes being a major a-hole.


CODO ERGO SUM
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 07/23/2007 :  14:41:04  Show Profile  Reply with Quote
Clueless

It's gotta be a troll from Fabian



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

pootle_flump
Flowing Fount of Yak Knowledge

United Kingdom
1064 Posts

Posted - 07/24/2007 :  08:06:58  Show Profile  Reply with Quote
If I write a program that understands T-SQL then I won't have to learn to understand it myself:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=86639
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 07/31/2007 :  13:05:00  Show Profile  Reply with Quote
Luckily he doesn't have to switch airplanes..he'd never make that connection

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87086



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Kristen
Test

United Kingdom
22431 Posts

Posted - 07/31/2007 :  13:56:38  Show Profile  Reply with Quote
Blimey, his post-padding-technique almost equals Peso's <BG>
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 07/31/2007 :  15:10:50  Show Profile  Reply with Quote
Peso's?

TEST



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Kristen
Test

United Kingdom
22431 Posts

Posted - 08/01/2007 :  01:58:41  Show Profile  Reply with Quote
Well,

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87073

has 6 consecutive posts
Go to Top of Page

Kristen
Test

United Kingdom
22431 Posts

Posted - 08/01/2007 :  01:59:33  Show Profile  Reply with Quote
Jarv's post has 3 lots of 3 consecutives ...
Go to Top of Page

Kristen
Test

United Kingdom
22431 Posts

Posted - 08/01/2007 :  01:59:43  Show Profile  Reply with Quote
TEST!
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30282 Posts

Posted - 08/01/2007 :  02:30:10  Show Profile  Visit SwePeso's Homepage  Reply with Quote
quote:
Originally posted by Kristen

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87073

has 6 consecutive posts
For once, I found an interesting problem.
I did this for my previous client in sql server 2000 with the
update x set @v = v = case when ... then ... else ... end


thingy.

The 2005 version is more elegant.



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

Kristen
Test

United Kingdom
22431 Posts

Posted - 08/01/2007 :  02:34:05  Show Profile  Reply with Quote
"The 2005 version is more elegant"

Indeed! Except I can't understand it!
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30282 Posts

Posted - 08/01/2007 :  02:44:26  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Which one of them?

The first one select the latest date according to parameters. This is the anchor part.
The recursive part looks for a record that has "EventTime + Duration" is equal to the last selected EventTime.
And the next time, the recursive part looks for a record that has "EventTime + Duration" is equal to the last selected EventTime.
And so on...

The second version does basically the same thing.
It gets all records according to parameters sorted by descending date. I then left join it with itself to see if EventTime + Duration is equal to EventTime of previous record.
Ultimately I return the record where NULL, meaning this is the earliest record with no match.



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

tkizer
Almighty SQL Goddess

USA
37466 Posts

Posted - 08/01/2007 :  12:06:32  Show Profile  Visit tkizer's Homepage  Reply with Quote
quote:
Originally posted by Kristen

"The 2005 version is more elegant"

Indeed! Except I can't understand it!



We've been using it for about a year in production now and the new T-SQL features are still foreign to me.

It took me a bit to figure out what Peter's solutions were doing, luckily he helped with an explanation. Thanks again, Peter.

Now no more talking about my post in the Twist List thread!

Tara Kizer
http://weblogs.sqlteam.com/tarad/

Edited by - tkizer on 08/01/2007 12:07:00
Go to Top of Page

Kristen
Test

United Kingdom
22431 Posts

Posted - 08/02/2007 :  04:01:43  Show Profile  Reply with Quote
This thread is now 7th in a Google search for "Twit List"

NALOPKT
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 08/02/2007 :  04:13:39  Show Profile  Reply with Quote
I'll know I'll have reached the pinacle status as a top-notch dba when I've got time to continuously post in this thread.

Until then... back to work.

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30282 Posts

Posted - 08/02/2007 :  07:02:35  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Sometimes, it's hard to see the obvious
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87230



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

pootle_flump
Flowing Fount of Yak Knowledge

United Kingdom
1064 Posts

Posted - 08/02/2007 :  07:50:55  Show Profile  Reply with Quote
How many poor practices can I squeeze into one process?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87242
I count three.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 08/02/2007 :  10:48:17  Show Profile  Reply with Quote
It's just painful

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87230



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

DonAtWork
Flowing Fount of Yak Knowledge

2165 Posts

Posted - 08/06/2007 :  07:28:45  Show Profile  Reply with Quote
Hi, I understand that you experts say "Don't use SELECT *", but who cares. Oh wait....

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=87342

Not really a twit, but the coding was twitty.

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30282 Posts

Posted - 08/06/2007 :  17:14:00  Show Profile  Visit SwePeso's Homepage  Reply with Quote
quote:
Hello,

I have a table with the following data: store, articles
I need to know how many articles in each store, in one sql query.
I know we can write smthg like:

select count(articles) from mystores group by store

But then i can't manipulate the data i get in my query! I am not writing t-sql, just a query.
I need to know for a given store the number or articles concerned.
Is there a way with CASE for example? Smthg like:

SELECT store, count(articles) ,
CASE store
WHEN '1' THEN store1count = store1count + 1
WHEN '2' THEN store2count = store2count + 1
ELSE 0
END

"total" FROM mystores

how can i define store1count and store2count in my query... remember , i can't use t-sql...
tx for helping!
Copied from http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=388164

What!? "I want to count the articles from a database but I do not want to use T-SQL because I am just writing a query"...




E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
Page: of 88 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000