Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL Join Question

Author  Topic 

Orza
Starting Member

1 Post

Posted - 2011-04-14 : 01:41:27
Hello,
I’m looking for a join method to produce the wanted result from the sample data with using cursor?? Is anyone can help me out on this one? Many Thanks.

/*====== Sample Data =========*/
no Person Owned Ball No
1 A 1
1 A 2
1 B 3
1 B 4

/*====Wanted Result====*/
no Person Owned Ball No
1 A 1
1 B 3
2 A 1
2 B 4
3 A 2
3 B 3
4 A 2
4 B 4

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-04-14 : 01:44:36
can you explain how the wanted result come about ?

can you also format the sample data & result enclosed it within the
[code] and [/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

mmarovic
Aged Yak Warrior

518 Posts

Posted - 2011-04-14 : 12:49:21
Is it Mensa test?

Mirko

My blog: http://mirko-marovic-eng.blogspot.com/
Go to Top of Page
   

- Advertisement -