Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Teaser 3

Status
Not open for further replies.

gmmastros

Programmer
Feb 15, 2005
14,901
US
Without running these queries, predict the output.

Code:
[COLOR=blue]If[/color] 1/0 = 10 And 1/1 = 0
  [COLOR=blue]Select[/color] [COLOR=red]'True'[/color] [COLOR=blue]As[/color] Query1
[COLOR=blue]Else[/color]
  [COLOR=blue]Select[/color] [COLOR=red]'False'[/color] [COLOR=blue]As[/color] Query1

Code:
[COLOR=blue]If[/color] 1/0 = 10 And [COLOR=#FF00FF]sqrt[/color](1)=0
  [COLOR=blue]Select[/color] [COLOR=red]'True'[/color] [COLOR=blue]As[/color] Query2
[COLOR=blue]Else[/color]
  [COLOR=blue]Select[/color] [COLOR=red]'False'[/color] [COLOR=blue]As[/color] Query2

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
i disagree

i was laughing as i posted it, and HarleyQuinn apparently also thought it was funny

you're outvoted :p

r937.com | rudy.ca
 
Stars!

Star to Denis for your interest.
Star esquared for mentioning the optimizer engine.
Star to NuJoizey, aspvbnetnerd, and kaht for making a valiant attempt to guess the answer.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Sorry chrissie. Here's your star.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
what, no star for me?

i made a really good joke :-(

in fact, when you think about it, my post was quite insightful -- dividing by zero should return nothing, which is what my spoiler said

r937.com | rudy.ca
 
And I laughed at Rudy's joke [sad]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
my big revelation in this thread was how the 'spoiler' thingy works. That was my big revelation in this thread. For a while that was just as confounding as the divide by zero...
 
my big revelation in this thread was how the 'spoiler' thingy works.

Yeah... I thought it would have been ultra helpful to have a javascript button on the spoiler box to automatically make the next black for you so that you don't have to highlight it to see it - but apparently I'm one of the few that thinks this is a worthwhile addition. [neutral]

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
What the F&¤#, a start for aspvbnetnerd.
What has happened to the world?

This is my first start ever, aspvbnetnerd so happy :)

I like these SQL Teaser

George
 
Watch out, the belgium guy is correcting your english [censored]

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Code:
DECLARE @Query1 Char(10)
If 1/0 = 10 And 1/1 = 0
  Set  @Query1 = 'True'
Else
  Set  @Query1 =  'False'

Print @Query1
Return false [thumbsdown]
 
It's "belgian guy".

It would be if you were just some guy from Belgium. But no - you are THE guy from Belgium, which makes you the Belgium guy.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top