Click here to Skip to main content
15,908,112 members
Home / Discussions / Database
   

Database

 
AnswerRe: How do I Compare Thumb Image by the Select Statement in SQL Server 2005....? Pin
Goutam Patra22-Nov-10 20:58
professionalGoutam Patra22-Nov-10 20:58 
AnswerI found the Solution.... Pin
Manish_Kumar_Nayak22-Nov-10 22:22
Manish_Kumar_Nayak22-Nov-10 22:22 
GeneralA general point Pin
Pete O'Hanlon22-Nov-10 22:50
mvePete O'Hanlon22-Nov-10 22:50 
GeneralRe: I found the Solution.... Pin
Eddy Vluggen23-Nov-10 7:46
professionalEddy Vluggen23-Nov-10 7:46 
Questionsql server notification services Pin
Simon_Whale22-Nov-10 5:37
Simon_Whale22-Nov-10 5:37 
AnswerRe: sql server notification services Pin
Pete O'Hanlon22-Nov-10 9:46
mvePete O'Hanlon22-Nov-10 9:46 
GeneralRe: sql server notification services Pin
Simon_Whale22-Nov-10 11:42
Simon_Whale22-Nov-10 11:42 
QuestionSQL LEFT JOIN query Pin
Joe Stansfield21-Nov-10 1:14
Joe Stansfield21-Nov-10 1:14 
Hey all,

I am still fairly knew to SQL query writing, and have searched to try and solve this by myself, however have had no luck!

I am trying to write a query that returns information from SaleInformation and File_Info, with SaleInformation including all records that match a query and File_Info returning the matching File_Name(I have a relationship between them with PID the primary key in File_Info) if the PID is a match.

However, my query is returning a result in every File_Name row return, even though I only have 3 entries in the File_Info PID column that match only 3 records in the Sale_information table. A gentle push in the right direction would be greatly appreciated!

Oh, on a side note - If I change the query to "ON File_Info.PID = SaleInformation.PID" I get the 3 records that match returned. Here is the query I have at the moment:

USE [C:\DATABASE\SALES.MDF]
GO

SELECT File_Info.File_Name, SaleInformation.PID, SaleInformation.Sale_date, SaleInformation.Sale_price
FROM File_Info LEFT OUTER JOIN SaleInformation
ON SaleInformation.Sale_price > 150000

It returns 183 rows. There are only 94 rows in the SaleInformation table and 3 in the File_Info table. I am very confused!

Regards,

Joe
AnswerRe: SQL LEFT JOIN query Pin
PIEBALDconsult21-Nov-10 3:15
mvePIEBALDconsult21-Nov-10 3:15 
GeneralRe: SQL LEFT JOIN query Pin
Joe Stansfield21-Nov-10 10:01
Joe Stansfield21-Nov-10 10:01 
AnswerRe: SQL LEFT JOIN query Pin
Mycroft Holmes21-Nov-10 13:30
professionalMycroft Holmes21-Nov-10 13:30 
GeneralRe: SQL LEFT JOIN query Pin
Joe Stansfield21-Nov-10 15:58
Joe Stansfield21-Nov-10 15:58 
GeneralRe: SQL LEFT JOIN query Pin
Mycroft Holmes21-Nov-10 16:38
professionalMycroft Holmes21-Nov-10 16:38 
GeneralRe: SQL LEFT JOIN query Pin
Joe Stansfield21-Nov-10 17:09
Joe Stansfield21-Nov-10 17:09 
Questionbest way to save System.Color? Pin
Jassim Rahma20-Nov-10 0:20
Jassim Rahma20-Nov-10 0:20 
AnswerRe: best way to save System.Color? Pin
Goutam Patra20-Nov-10 1:34
professionalGoutam Patra20-Nov-10 1:34 
GeneralRe: best way to save System.Color? Pin
Luc Pattyn20-Nov-10 3:23
sitebuilderLuc Pattyn20-Nov-10 3:23 
GeneralRe: best way to save System.Color? Pin
PIEBALDconsult20-Nov-10 12:38
mvePIEBALDconsult20-Nov-10 12:38 
Questionselect a random record Pin
Jassim Rahma19-Nov-10 23:52
Jassim Rahma19-Nov-10 23:52 
AnswerRe: select a random record Pin
Blue_Boy20-Nov-10 2:37
Blue_Boy20-Nov-10 2:37 
AnswerRe: select a random record Pin
Niladri_Biswas22-Nov-10 2:25
Niladri_Biswas22-Nov-10 2:25 
Questionsave total time in mysql Pin
Jassim Rahma19-Nov-10 23:46
Jassim Rahma19-Nov-10 23:46 
AnswerRe: save total time in mysql Pin
Eddy Vluggen20-Nov-10 5:43
professionalEddy Vluggen20-Nov-10 5:43 
QuestionDatabase administrator Pin
future383919-Nov-10 12:21
future383919-Nov-10 12:21 
AnswerRe: Database administrator Pin
Dr.Walt Fair, PE19-Nov-10 13:59
professionalDr.Walt Fair, PE19-Nov-10 13:59 

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.