|
-
Nov 13th, 2006, 09:28 PM
#1
Thread Starter
Fanatic Member
Selecting details on inner query
I'm not really into SQL programming but I need some query to select master including the details on just one result rest. This is weird but the format is something like this
Master
code | description
Details
code | another_description
So if I have data like
001 | Ballpen
and I have
001 | Freak ballpen
002 | Cool ballpen
I can select them by joining but what if I only have to return a query based from the master and concatenating the details delimited by some characters. Something like
001 | Ballpen | Freak ballpen, Cool ballpen
As I said, I'm not into SQL so any help is greatly appreciated. Thanks a bunch.
Edit: This is Oracle btw, but ideas are appreciated. My big thanks.
-
Nov 14th, 2006, 12:59 AM
#2
Re: Selecting details on inner query
where is the link or which field will be used to link the master and details table....anyway using this query you can get some idea...
Code:
SELECT Master.code AS MasterCode, Master.Description AS MasterDescription, Detail.AnotherDescription AS DetailDescription
FROM Master INNER JOIN Details ON Master.Code = Detail.Code
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|