Wrox Programmer Forums
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2005, 03:10 PM
Registered User
 
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parsing

In the select statement, how do I code a list separated by commas in a single field to show as a single descending list?

example: field name: colors

values show as: red, blue, orange, green, and white


But in my results they must show as:

red
blue
orange
green
white

Any ideas?

 
Old July 19th, 2005, 07:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Where do you see the result? Is this related to MS SQL server/MS Access? Are you talking about SQL query analyser? Is that you wanted to do something from the frontend to get that kind of output?

No mention about that...

_________________________
- Vijay G
Strive for Perfection
 
Old July 20th, 2005, 12:17 PM
Registered User
 
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I should clarify....

This will be SQL query analyser to export into a simple .xls spreadsheet.

 
Old July 20th, 2005, 02:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

If you are looking at sql query analyser, then switch to grid mode(press CTRL + D). Then you should see the result in grid as you wanted.

Assuming your Select statement would look like
Code:
SELECT colors from TABLENAME;
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 21st, 2005, 10:35 AM
Registered User
 
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, Vijay.






Similar Threads
Thread Thread Starter Forum Replies Last Post
XML parsing denzil_cactus Perl 0 June 11th, 2007 02:34 AM
financial parsing newbiexsl XSLT 5 April 26th, 2007 02:55 AM
XML Parsing SCADA_Monkey XML 2 March 11th, 2007 03:20 PM
XML Parsing tgopal .NET Web Services 1 June 15th, 2004 03:25 AM
Parsing in PHP Walter G Pro PHP 2 August 14th, 2003 01:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.