Re: extreme help with query of 2 tables into 1 long table



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)
>
.



Relevant Pages

  • Re: Query Help with IF stmt
    ... Hi Andy, ... I suspect that the EmpName column in reality won't hold ... Some rows of sample data. ... Best, Hugo ...
    (microsoft.public.sqlserver.mseq)
  • Re: extreme help with query of 2 tables into 1 long table
    ... or use the crosstab query wizard). ... And Excel ... Some third party applications that might help you generate the crosstab ... Best, Hugo ...
    (microsoft.public.sqlserver.mseq)
  • Nicht genügend Arbeitsspeicher Excel2000
    ... wie ich diese Datei mit Excel 2000 geöffnet kriege? ... Hugo von Allmen ...
    (microsoft.public.de.excel)
  • Re: Select statement
    ... Sample data ... Expected output ... Best, Hugo ... (Remove _NO_ and _SPAM_ to get my e-mail address) ...
    (microsoft.public.sqlserver.programming)
  • Re: TRICKY SQL
    ... irrelevant columns) and your sample data as INSERT statements, ... Best, Hugo ... (Remove _NO_ and _SPAM_ to get my e-mail address) ...
    (microsoft.public.sqlserver.programming)