You are here: Re: Results in Parallel columns « MsSQL Server « IT news, forums, messages
Re: Results in Parallel columns

Posted by -CELKO- on 10/02/81 11:50

>>I need to place the results of two different queries in the same result table parallel to each other. <<

This is not a table; the rows of a table model elements of a set of the
same kind of thing. What you want is a display kludge to show, say,
automobiles and squid as if they were the same kind of things.

Here is your kludge, since people here often gripe that I do not post
the bad code the OP wants:

SELECT *, ROW_NUMBER() OVER(ORDER BY duh) AS lft_nbr
FROM Foo
FULL OUTER JOIN
SELECT *, ROW_NUMBER() OVER(ORDER BY doh) AS rgt_nbr
FROM Bar
ON Foo.lft_nbr = Bar.rgt_nbr;

The right way is handle display issues in the applications and front
ends, not the RDBMS.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация