Help in displaying records in single row

This is a discussion on "Help in displaying records in single row" within the Databases section. This forum, and the thread "Help in displaying records in single row are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 18th, 2007, 17:53
New Member
Join Date: Sep 2007
Location: USA
Age: 32
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Help in displaying records in single row

Hi,

I've written the following sql,but it is displaying the results in multiple rows,Could any body advise me on how to display the returned records in only one row.

Select
CASE WHEN data_center.abbrev IN ('WIND') THEN 'Windward' END AS data_center,
CASE WHEN data_center.abbrev IN ('2BELL') THEN '2BELL' END AS data_center,
CASE WHEN data_center.abbrev IN ('ALN') THEN 'Allen' END AS data_center,
CASE WHEN data_center.abbrev IN ('GLEN') THEN 'Glenridge' END AS data_center,
CASE WHEN data_center.abbrev IN ('NAS') THEN 'Nashville' END AS data_center,
CASE WHEN data_center.abbrev IN ('ALLE') THEN 'Schaumberg' END AS data_center,
CASE WHEN data_center.abbrev IN ('B2DE') THEN 'HOFFMANESTATES' END AS data_center,
CASE WHEN data_center.abbrev IN ('DK') THEN 'Unknown' END AS data_center,
CASE WHEN data_center.abbrev IN ('B2DL', 'B9PD', 'B9PPD', 'B9PR') THEN 'BOTHELL' END AS data_center,
CASE WHEN data_center.abbrev IN ('SD') THEN 'SanDiego' END AS data_center,
CASE WHEN data_center.abbrev IN ('HWY') THEN 'Hayward' END AS data_center,
CASE WHEN data_center.abbrev IN ('FF') THEN 'Fairfield' END AS data_center,
CASE WHEN data_center.abbrev IN ('PEW') THEN 'Pewaukee' END AS data_center,
CASE WHEN data_center.abbrev IN ('Alph') THEN 'Alpharetta' END AS data_center,
CASE WHEN data_center.abbrev IN ('CHAR') THEN 'Charlotte' END AS data_center,
CASE WHEN data_center.abbrev IN ('KC') THEN 'KansasCity' END AS data_center,
CASE WHEN data_center.abbrev IN ('JAX') THEN 'Jackson' END AS data_center,
CASE WHEN data_center.abbrev IN ('SF') THEN 'Southfield' END AS data_center,
CASE WHEN data_center.abbrev IN ('BRMG') THEN 'Birmingham' END AS data_center,
CASE WHEN data_center.abbrev IN ('DAL') THEN 'Dallas' END AS data_center,
CASE WHEN data_center.abbrev IN ('STL') THEN 'SaintLouis'
END
AS data_center from data_center;

Thanks,
Anil
Reply With Quote

Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
single rounded side rusting555 Web Page Design 1 Apr 1st, 2008 09:21
Spacing text links in a single DIV slimboyfatz32 Web Page Design 7 Jan 30th, 2008 10:44
Single Colored Themes josephman1988 Webforumz Cafe 4 Sep 29th, 2007 21:48
PHP/MYSQL Displaying records Ydot PHP Forum 6 Jul 23rd, 2007 06:12
gay single edinburgh graeme5 Introduce Yourself 13 Apr 14th, 2007 08:27


All times are GMT. The time now is 20:00.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43