Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 August 5th, 2004, 09:44 PM
Registered User
 
Join Date: Aug 2004
Location: Bellevue, NE, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default convert long column into rows

Using Oracle 9i SQL (no PL/SQL due to gui front end)
I have 3 columns. System, franchise, servcode. In servcode column it can be up to 1200 char wide. Service codes displayed set up like this: AA BB CC DD EE FF etc. May be one 2char code wide, or 300 2char codes wide with a space in between. Need to figure out how to display system, franchise, and then convert the servcode column into multiple rows, as many rows as there are codes. Ive tried a replace command that wherever there is the space, that a CHR(10) (carriage return) is inserted. That got me multiple rows of code, but in my gui (Forest & Trees) it still shows as one row. Ex:
system franchise servcode
8888 10 AA
                         BB
                         CC
                         DD etc
I really need the system & franchise to be displayed on each line,and the codes displayed along side them. Have never run across a problem like this before. any ideas would be greatly appreciated. Thanks much.


 
Old August 6th, 2004, 02:49 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

  Convert to an array using

dim arrSrvCode
arrSrvCodes=split(srvcode," ")

 then, do your coding...

 
Old August 7th, 2004, 01:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Did you try replacing SPACE with VBCrLf instead of CHR(10), did that help? Has this got anything to do with ASP? If so, can post that part of code so that to help you better.

Cheers!

_________________________
- Vijay G
Strive for Perfection




Similar Threads
Thread Thread Starter Forum Replies Last Post
Data too long for column 'ResumeInfo' at row 1 Snowby Pro PHP 0 April 2nd, 2008 02:32 AM
convert columns to rows in sql hoangmv0101 SQL Language 0 January 2nd, 2007 02:04 AM
column to rows mitasid Beginning VB 6 1 June 12th, 2006 01:37 PM
Table column to stretch height on long page nbryson HTML Code Clinic 12 October 19th, 2005 05:12 PM
CONVERT DB_NUMERIC TO LONG tutia Visual C++ 1 July 26th, 2003 12:09 AM





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