Garayed.com  

Go Back   Garayed.com > Oracle
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-10-2005, 09:15 AM
Mariusz
 
Posts: n/a
Default sql with multiple aliases, multirow record

Hello,

I have table T1 with multiple row record:

ID code text
1 123 aa \
1 124 bb \
1 134 cc / one logical record
1 322 dd /
2 123 ff
2 124 gg
2 344 hh
3 ...........
3 ............
........
...........

When I run:
select a.ID, concat(a.text, concat(b.text, c.text)) from T1 a, T1 b, T1 c
where a.code='123' and b.code='124' and c.code='322';

I get:
1 aa bb dd
2 ff gg dd

So, c.text is appened from previous row. How to clear c.text before next pass ?

It should return:

1 aa bb dd
2 ff gg

I other words, how to select one row data from multi-row record ?
Regards,
mariusz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:48 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.