Using a text field to combine multiple varchar(255) fields 
Author Message
 Using a text field to combine multiple varchar(255) fields

I have a table calles basictext

Create table basictext
  (serialnum int not null, basictextid int not null, basictext varchar(255)
not null)

data examples:
Serialnum          Basictextid  Basictext
1               1100000024      This is a test , This is a test
2               1100000024      This is a test, This is test 2
1               1100000025      This is the second test
2               1100000025      This is the second test
3               1100000025      This is the second test

For example
I need to bring back all of the Basictext for Basictextid 1100000024 into
one field for Crystal reports.

I've tried inserting all off the rows for a certain basictextid into a text
field in a text temporary table

Any ideas would be appreciated?



Sat, 17 Mar 2001 03:00:00 GMT
 Using a text field to combine multiple varchar(255) fields

You could use a stored procedure that would return a resultset with a record
for each DISTINCT BasicTextID which concatenates the BasicText fields
together, and then connect your crystal report to that SP.


Quote:
>I have a table calles basictext

>Create table basictext
>  (serialnum int not null, basictextid int not null, basictext varchar(255)
>not null)

>data examples:
>Serialnum          Basictextid Basictext
>1 1100000024 This is a test , This is a test
>2 1100000024 This is a test, This is test 2
>1 1100000025 This is the second test
>2 1100000025 This is the second test
>3 1100000025 This is the second test

>For example
>I need to bring back all of the Basictext for Basictextid 1100000024 into
>one field for Crystal reports.

>I've tried inserting all off the rows for a certain basictextid into a text
>field in a text temporary table

>Any ideas would be appreciated?



Sat, 31 Mar 2001 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. SQL 6.5 - text field to varchar(255) fields

2. Text fields into many varchar(255)'s

3. Cannot retrieve MS-SQLServer VARCHAR(n>255) or TEXT field in Delphi program

4. DB-LIB varchar fields limited to 255 characters

5. Storing more that 255 Characters in a VarChar field

6. DBLibrary access VarChar field larger than 255 bytes

7. DTS and varchar field are truncating at 255 chararacters

8. varchar fields longer than 255 in length

9. NVL function and VARCHAR(255) fields BUGS ;)

10. Combining fields from multiple records into a single field

11. Appending multiple varchar fields to to a text

12. How to: Get Text field larger than 255 characters


 
Powered by phpBB® Forum Software