Click here to Skip to main content
15,907,687 members
Home / Discussions / Database
   

Database

 
GeneralRe: Accessing the file of a T-SQL BACKUP call Pin
Uwe Keim3-Aug-09 6:00
sitebuilderUwe Keim3-Aug-09 6:00 
QuestionJoin performance Pin
Xmen Real 1-Aug-09 15:26
professional Xmen Real 1-Aug-09 15:26 
AnswerRe: Join performance Pin
Mycroft Holmes1-Aug-09 23:43
professionalMycroft Holmes1-Aug-09 23:43 
AnswerRe: Join performance Pin
Vimalsoft(Pty) Ltd2-Aug-09 21:46
professionalVimalsoft(Pty) Ltd2-Aug-09 21:46 
GeneralRe: Join performance Pin
Xmen Real 3-Aug-09 2:45
professional Xmen Real 3-Aug-09 2:45 
GeneralRe: Join performance Pin
Vimalsoft(Pty) Ltd3-Aug-09 3:07
professionalVimalsoft(Pty) Ltd3-Aug-09 3:07 
GeneralRe: Join performance Pin
Xmen Real 3-Aug-09 3:21
professional Xmen Real 3-Aug-09 3:21 
QuestionSQL query: Get correspondence descriptions instead foreign key IDs. Is that possible ? Pin
sdancer7531-Jul-09 5:00
sdancer7531-Jul-09 5:00 
Hi,

I have 4 tables in a cascading mode like this : 1)Countries --> 2)Chapionships --> 3) Teams --> 4) Coupons

Coupons table has 2 IDs (HomeTeamID and HostTeamID) that points to the Teams table.
It has also IDs for the tables (Countries and Chapionships)

All I want is to select the appropriate records from the Coupons Table, but instead of the foreing keys IDs I want the correspondence descriptions that these keys shows from their tables (ie Countries, Chapionships and Teams).

Is that possible ?

All I did until now is the query

SELECT * FROM Coupons LEFT JOIN (Countries, Chapionships, Teams)<br />
ON (Countries.CountryID=Coupons.CountryID AND Chapionships.ChapionshipID=Coupons.ChapionshipID AND ( Teams.TeamID=Coupons.HomeTeamID OR Teams.TeamID=Coupons.HostTeamID)) Where Date='2009-07-31' order by Time Asc;	


but I get double rows for each record since there is an OR clause inside the ON. Any better solution ?

Regards

sdancer75

AnswerRe: SQL query: Get correspondence descriptions instead foreign key IDs. Is that possible ? Pin
Blue_Boy31-Jul-09 7:12
Blue_Boy31-Jul-09 7:12 
QuestionSQL SP exception: "Incorrect syntax near '-'" Pin
cdietschrun31-Jul-09 4:14
cdietschrun31-Jul-09 4:14 
AnswerRe: SQL SP exception: "Incorrect syntax near '-'" Pin
That's Aragon1-Aug-09 1:56
That's Aragon1-Aug-09 1:56 
QuestionHow to Use an Array Variant as a control name? Pin
dpminusa31-Jul-09 2:00
dpminusa31-Jul-09 2:00 
AnswerRe: How to Use an Array Variant as a control name? Pin
Luc Pattyn31-Jul-09 2:22
sitebuilderLuc Pattyn31-Jul-09 2:22 
GeneralRe: How to Use an Array Variant as a control name? Pin
dpminusa31-Jul-09 9:53
dpminusa31-Jul-09 9:53 
GeneralRe: How to Use an Array Variant as a control name? Pin
Luc Pattyn31-Jul-09 10:20
sitebuilderLuc Pattyn31-Jul-09 10:20 
GeneralRe: How to Use an Array Variant as a control name? Pin
dpminusa31-Jul-09 10:28
dpminusa31-Jul-09 10:28 
QuestionFull Text Search Pin
ps_prakash0230-Jul-09 21:33
ps_prakash0230-Jul-09 21:33 
QuestionData Retrieval Pin
mgr_2k730-Jul-09 20:25
mgr_2k730-Jul-09 20:25 
AnswerRe: Data Retrieval Pin
Blue_Boy30-Jul-09 21:37
Blue_Boy30-Jul-09 21:37 
Questionsql server 2005 installation Pin
Spurple30-Jul-09 18:14
Spurple30-Jul-09 18:14 
AnswerRe: sql server 2005 installation Pin
Mycroft Holmes30-Jul-09 20:24
professionalMycroft Holmes30-Jul-09 20:24 
GeneralRe: sql server 2005 installation Pin
Spurple30-Jul-09 23:48
Spurple30-Jul-09 23:48 
AnswerRe: sql server 2005 installation Pin
Eddy Vluggen31-Jul-09 6:14
professionalEddy Vluggen31-Jul-09 6:14 
AnswerRe: sql server 2005 installation Pin
Jerry Hammond2-Aug-09 3:55
Jerry Hammond2-Aug-09 3:55 
AnswerRe: sql server 2005 installation Pin
Robin_Roy3-Aug-09 0:16
Robin_Roy3-Aug-09 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.