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
 I like my own post

Author  Topic 

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-06 : 12:20:09
This is too funny: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=108179

Looking at her other threads, she is here only to promote her blog. Even the questions she's asked appear to be for the sole purpose of writing a new blog with our answers.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

LTack
Posting Yak Master

193 Posts

Posted - 2008-08-06 : 12:42:03
It's because her blog is just sooo amazing! I mean, really, you should totally check it out. You wouldn't even know that the answers were yours to begin with once the editor takes a whack at the responses!

__________
SQL Newbie
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-08-06 : 13:04:16
If Madhi hadn't jumped in there I was going to do my "3K to TG" post - then add a few congrats posts to make sure it had a few responses Of course I was going to do it under my other screen name: Spirit1

Be One with the Optimizer
TG
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-08-06 : 13:06:29
ha ha very funny

_______________________________________________
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

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-06 : 13:54:30
Is it possible to run a query similar to

SELECT IP, COUNT(*) FROM Users GROUP BY IP

Then obfuscate the IP and publish the result?
I think it would be interesting to see that there are multiple usernames per IP, and how many at most.



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

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-06 : 14:15:08
Unfortunately, the moderators don't have this access.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

DavidChel
Constraint Violating Yak Guru

474 Posts

Posted - 2008-08-06 : 14:20:49
Do they still call that behavior being a sock puppet?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-08-06 : 15:45:13
I just posted links to these two threads on that thread on her blog.

On good turn deserves another.


CODO ERGO SUM
Go to Top of Page

jdaman
Constraint Violating Yak Guru

354 Posts

Posted - 2008-08-06 : 16:11:15
Terrible.
http://myblog-sql.blogspot.com/2008_07_27_archive.html

Using her logic this:
select A,B,C,D from person.address
where city in(Seattle,Boston,Nevada)

should be replaced with this:
select A,B,C,D from person.address
where city = 'Seattle'
union
select A,B,C,D from person.address
where city = 'Boston'
union
select A,B,C,D from person.address
where city = 'Nevada'
Go to Top of Page

DavidChel
Constraint Violating Yak Guru

474 Posts

Posted - 2008-08-06 : 16:12:31
Oh c'mon folks... I just looked at her blog.

I bet you guys didn't know that it's not wise to start a query:

SELECT * from tablename

http://myblog-sql.blogspot.com/search/label/select

Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-08-07 : 02:56:42
hey! that blog's gone! ...and i wanted to learn why select * was bad

...oh hang on, maybe it was just to laugh at what MVJ had posted... er... yeah that was it

Em
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2008-08-07 : 04:46:47
quote:
Originally posted by Peso

Is it possible to run a query similar to

SELECT IP, COUNT(*) FROM Users GROUP BY IP

Then obfuscate the IP and publish the result?
I think it would be interesting to see that there are multiple usernames per IP, and how many at most.



E 12°55'05.25"
N 56°04'39.16"


Based on the Snitz schema (available here: http://forum.snitz.com/specs.asp)
then this (not really tested) should do it:
SELECT	  naughtyNaughtyPeople	= dbo.FORUM_MEMBERS.M_NAME
, naughties.naughtyKey
FROM dbo.FORUM_MEMBERS
INNER JOIN
(
SELECT M_IP
, naughtyKey = DENSE_RANK() OVER ( ORDER BY M_IP)
FROM dbo.FORUM_MEMBERS
GROUP BY M_IP
HAVING COUNT(*) > 1
) AS naughties
ON naughties.M_IP = dbo.FORUM_MEMBERS.M_IP
ORDER BY naughties.naughtyKey
I'm sure Graz would oblige if you ask nicely. Of course, different people from one company would share an IP so it can't be taken as cast iron.

EDIT - oops - SQL Error
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-07 : 05:17:01
It maybe violates some privacy issues?


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

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-08-07 : 08:44:39
Don't some ISPs assign IP addresses (depending on your connection properties)? would that result in many IPs per user over time?

Be One with the Optimizer
TG
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-07 : 09:12:22
I don't know how the M_IP column is managed over time.
Maybe it stores the original registering IP?
And the current IP is stored in the POSTS table?



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

pootle_flump

1064 Posts

Posted - 2008-08-07 : 09:43:09
[code]SELECT col_name = CAST(name AS VARCHAR(20))
, t_name = OBJECT_NAME(object_id)
FROM sys.columns
WHERE name like '%_ip'
ORDER BY OBJECT_NAME(object_id), name[/code]

[code]col_name t_name
-------------------- ---------------------------
R_IP FORUM_A_REPLY
T_IP FORUM_A_TOPICS
F_IP FORUM_FORUM
M_IP FORUM_MEMBERS
M_LAST_IP FORUM_MEMBERS
M_IP FORUM_MEMBERS_PENDING
M_LAST_IP FORUM_MEMBERS_PENDING
R_IP FORUM_REPLY
T_IP FORUM_TOPICS[/code]
Go to Top of Page

LTack
Posting Yak Master

193 Posts

Posted - 2008-08-07 : 10:28:14
TG, I think AOL does...and it's just about every time a user signs online that they're given a new IP.

__________
SQL Newbie
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-08-07 : 11:22:19
quote:
Originally posted by elancaster

hey! that blog's gone! ...and i wanted to learn why select * was bad

...oh hang on, maybe it was just to laugh at what MVJ had posted... er... yeah that was it

Em



All I did was post links back to this thread, and the other one. Nice to know I was able to make a difference.




CODO ERGO SUM
Go to Top of Page
   

- Advertisement -