View Single Post
  #1 (permalink)  
Old 07-03-09, 11:54
sri.P sri.P is offline
Registered User
 
Join Date: Jun 2009
Posts: 2
get multiple records for one record

Hi,

I have a requirement where i need to produce multiple records for a single record.

Example:
Input:
col1 col2 col3
1 A &
2 B $
3 C #
4 D @
Output:
col1 col2 col3 col4
1 A & 1
1 B $ 2
2 C # 1
2 D @ 2

That means for each value of "column1" i want to get next two records with "column2", "column3" and "column4" which gives the count.

any help would be greatly appreciated.

Thanks,
Sri
Reply With Quote