De-normalizing query
- From: jim_geissman@xxxxxxxxxxxxxxx
- Date: 12 Jul 2006 15:37:03 -0700
I have this table...
CREATE TABLE #Test (ID char(1), Seq int, Ch char(1))
INSERT #Test SELECT 'A',1,'A'
INSERT #Test SELECT 'A',2,'B'
INSERT #Test SELECT 'A',3,'C'
INSERT #Test SELECT 'B',1,'D'
INSERT #Test SELECT 'B',2,'E'
INSERT #Test SELECT 'B',3,'F'
INSERT #Test SELECT 'B',4,'G'
....and am searching for this query....
SELECT ID, Pattern=...?? FROM #Test....??
....to give this result, where Pattern is the ordered concatenation of
Ch for each ID:
ID Pattern
A ABC
B DEFG
Thanks for any help!
Jim
.
- Follow-Ups:
- Re: De-normalizing query
- From: markc600
- Re: De-normalizing query
- Prev by Date: Re: 2005: calling .NET procedure - one more question
- Next by Date: Re: problems with query
- Previous by thread: problems with query
- Next by thread: Re: De-normalizing query
- Index(es):
Relevant Pages
|