Re: SQL Query Quandry
From: Chris Hohmann (nospam_at_thankyou.com)
Date: 04/19/04
- Next message: John Hoge: "Parent/Child relationships, relating to ADO and SQL Server"
- Previous message: William Morris: "Re: Application Recommendations Needed"
- In reply to: Laphan: "Re: SQL Query Quandry"
- Next in thread: Laphan: "Re: SQL Query Quandry"
- Reply: Laphan: "Re: SQL Query Quandry"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Apr 2004 11:02:24 -0700
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:4082d9f1_3@127.0.0.1...
> Dear Chris
>
> I don't know how the hell you could make something out of my ramblings
and I
> did doubt it when I put it through Query Analyser, but it is
absolutely spot
> on when put through a Pivot Table!!!
>
> This union thing is completely different to what I expected.
>
> How the hell do you guys do it???
>
> I've got 2 SQL books (1 called Sams 24 hour SQL and the other 'the
Practical
> SQL handbook') and neither gives me any clue on how to do the things
that
> you guys know. Its so frustrating!!
>
> Do you know of a place/site that will explain this sort of thing to me
in a
> 'I'm thick - help me' sort of way??
>
> Many thanks all the same.
Most of what I know (which believe it or not is very little) comes from
fields combat/trial by fire. Joe Celko's insights in relational
databases are pretty amazing. I frequently filter my google group
searches with him as the author when I want the "definitive" answer to
something. His book "SQL for Smarties" is also a must have. And, as
always this newsgroup can be an excellent resource for your ASP/DB
related questions. There's no real black magic in the query I provided.
I simply added a dummy/filler set of data to create all the rows/columns
needed. That's what the second query is. Omitting the WHERE/JOIN clause
creates a Cartesian product, i.e. every sales person matched up with
every stock category.
HTH
-Chris Hohmann
- Next message: John Hoge: "Parent/Child relationships, relating to ADO and SQL Server"
- Previous message: William Morris: "Re: Application Recommendations Needed"
- In reply to: Laphan: "Re: SQL Query Quandry"
- Next in thread: Laphan: "Re: SQL Query Quandry"
- Reply: Laphan: "Re: SQL Query Quandry"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|