Re: extreme help with query of 2 tables into 1 long table
- From: "LU" <LU@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 9 Jun 2005 09:42:06 -0700
Hugo,
When you say "front end/presentatio layer" can I import and do in access or
excel? If so, can you give me a link where I can do this in any of these? I
know how to export (I think I do.lol), but I'll need help with crosstab, etc.
Or is this something I can do in asp.net? or a third party component?
Thanks
"Hugo Kornelis" wrote:
> On Tue, 7 Jun 2005 10:26:02 -0700, BIGLU wrote:
>
> (snip)
> >IF YOU HAVE A BETTER WAY TO GET ALL THE INFORMATION ANY SUGGESTIONS WOULD BE
> >GREAT!
>
> Hi BIGLU,
>
> First: The format you used to describe your data makes it very hard to
> read and understand and almost impossible to reproduce. For future
> postings, please include CREATE TABLE and INSERT statements for table
> structure and sample data, as described here: www.aspfaq.com/5006.
>
> Second: What you're trying to achieve looks like a pivot, or cross-tab
> query. The front end/presentation layer is actually the best place for
> that task. If you have to do it on the server, then try if you can adapt
> the following to your needs:
>
> SELECT u.UserID,
> MAX(CASE WHEN d.DetailCD = 'awdM0' THEN d.detailValue END) AS
> awdM0,
> MAX(CASE WHEN d.DetailCD = 'awdD0' THEN d.detailValue END) AS
> awdD0,
> .....
> FROM Users AS u
> INNER JOIN UserDetails AS d
> ON d.UserID = u.UserID
> GROUP BY u.UserID
>
>
> Best, Hugo
> --
>
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
.
- Follow-Ups:
- Re: extreme help with query of 2 tables into 1 long table
- From: Hugo Kornelis
- Re: extreme help with query of 2 tables into 1 long table
- References:
- extreme help with query of 2 tables into 1 long table
- From: BIGLU
- Re: extreme help with query of 2 tables into 1 long table
- From: Hugo Kornelis
- extreme help with query of 2 tables into 1 long table
- Prev by Date: Re: Deploying vb.net english query application
- Next by Date: Re: extreme help with query of 2 tables into 1 long table
- Previous by thread: Re: extreme help with query of 2 tables into 1 long table
- Next by thread: Re: extreme help with query of 2 tables into 1 long table
- Index(es):
Relevant Pages
|
|