Click here to Skip to main content
15,896,730 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I wonder if anyone would help me out here, I m trying to link tables together to get some information to produce a report. But i m new to sql so need some help completing this asap:

select * from tvdba.mdd_media, tvdba.mdd_containers, tvddba.mdd_media_contnrs_link
where m.media_id = l.media_id (+) --not sure here if i should do where media_id(media_id like '%' +....--


I want to join the query for starters!

So for example, i want to select the following items:
Media ID
Series Title
Format
Version
Location
Filename
Status

Any ideas how to go about this, would be very helpful, something to start me off.

Thanks in advance
Posted
Updated 22-Mar-13 3:04am
v2
Comments
[no name] 22-Mar-13 8:49am    
I am not at all sure what it is that you are asking. "select all the information and then add the data parameters to the where clause" makes no sense. What I am sure of though is that you want a JOIN in your query.
Geofferz 22-Mar-13 9:02am    
Yeah think didnt explain it properly there, i want to start with joining the query

1 solution

Join works basically like this:

SELECT TableA.*, TableB.*, TableC.*, TableD.*
FROM TableA TA
JOIN TableB TB
ON TA.aID = TB.aID
JOIN TableC TC
ON TA.cID = TC.cID
JOIN TableD TD
ON TA.dID = TD.dID
WHERE TA.media_id LIKE ...
 
Share this answer
 
v2
Comments
Geofferz 25-Mar-13 7:17am    
Thanks Du

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900