-
Sql ?
I have a table with the many records similar to the following:
-----TEST------
COL1 COL2
------ ------
Test1 A
Test1 B
Test1 C
Test1 D
Test2 A
Test2 B
Test2 C
Is there an SQL statement that would return the result:
COL1 CONCATCOL2
------ -----------
Test1 ABCD
Test2 ABC
Thanks for any help you may be able to provide.
-
You have to use a cursor for that. There is no CONCATENATION function similar to SUM in T-SQL.
-
i have had good success with table functions (Oracle9i) for simplifying the SQL around this type of problem.
-
Would either of you be able to give an example?
-
hate to make you wait but there will be an example in an article i wrote right here on DatabaseJournal within the next day or two.
-
-
Thanks jkoopmann, unfortunately I am not using Oracle. I am using DB2 on an AS/400.
Does anyone have an example of the cursor solution to this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|