|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
sql query question
I'm trying to get the right output for a query and I can't seem to do what I want to... wondering if I'm just missing something.
I have 2 tables, for simplicity sake we will say they're like this Books that has columns of ISBN and Title Authors that has columns of ISBN and Authors Books has the following data: ISBN Title 1234 Some Title Authors has the following data: ISBN Authors 1234 John Smith 1234 Bill Jones So when I join these 2 tables I get 2 rows, because my book "Some Title" has 2 authors. What i want to retrieve is 1 row that lists both authors like this: ISBN Title Authors 1234 Some Title John Smith, Bill Jones Is there some way to do this w/ a simple query? |
|
#2
|
||||
|
||||
|
with a simple query? no
|
|
#3
|
|||
|
|||
|
well then how about a not so simple query? a push in the right direction would be more than helpful.
would it be any easier in oracle? the tables originate in oracle but somewhere in the process get transfered to mssql. |
|
#4
|
||||
|
||||
|
if you can write a stored procedure, use a cursor to walk the result set
http://sqlteam.com/item.asp?ItemID=2368 rudy |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > sql query question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|