Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Todd Carrier
»
Know your UNION(s), NULL(s), COUNT(s) ?
25 posts, Page 3 of 3
««
«
1
2
3
Know your UNION(s), NULL(s), COUNT(s) ?
Rate Topic
Display Mode
Topic Options
Author
Message
Pat Reiter
Pat Reiter
Posted Tuesday, June 10, 2008 11:42 AM
Valued Member
Group: General Forum Members
Last Login: Friday, August 17, 2012 6:07 PM
Points: 62,
Visits: 124
re PL/SQL: I confess that I have been visiting the 'dark side'.
Post #514677
Brian Munier
Brian Munier
Posted Tuesday, September 16, 2008 6:22 AM
SSC Veteran
Group: General Forum Members
Last Login: Thursday, October 04, 2012 11:13 AM
Points: 257,
Visits: 80
I went to check my guess and ran:
WITH DATA (Numbers) AS
(SELECT NULL UNION ALL
SELECT NULL UNION ALL
SELECT NULL UNION ALL
SELECT 1 UNION ALL
SELECT 2 UNION
SELECT 3)
SELECT COUNT(ALL Numbers) AS NULLNumberCount FROM DATA
WHERE Numbers IS NULL
and got:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'WITH'.
Ooops
Post #570134
Christopher Stobbs
Christopher Stobbs
Posted Tuesday, September 16, 2008 6:28 AM
SSCommitted
Group: General Forum Members
Last Login: Wednesday, February 24, 2010 4:10 AM
Points: 1,553,
Visits: 2,232
if your with is not the first line of code, then you need a ; before it
----------------------------------------------
Try to learn something about everything and everything about something.
- Thomas Henry Huxley
Posting Best Practices
Numbers / Tally Tables
SQL-4-Life
Post #570140
Brian Munier
Brian Munier
Posted Tuesday, September 16, 2008 6:47 AM
SSC Veteran
Group: General Forum Members
Last Login: Thursday, October 04, 2012 11:13 AM
Points: 257,
Visits: 80
Christopher Stobbs (9/16/2008)
if your with is not the first line of code, then you need a ; before it
Ok, it worked. Thanks.
Post #570167
kapil_kk
kapil_kk
Posted Wednesday, December 05, 2012 11:02 PM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 7:40 PM
Points: 1,059,
Visits: 1,150
gr8 question....
Post #1393325
« Prev Topic
|
Next Topic »
25 posts, Page 3 of 3
««
«
1
2
3
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.