Click here to Skip to main content
15,921,203 members
Home / Discussions / Database
   

Database

 
AnswerRe: Why is it called "Hibernate"? Pin
originSH2-Jul-07 22:34
originSH2-Jul-07 22:34 
QuestionScript-generating commands? Pin
PIEBALDconsult2-Jul-07 10:20
mvePIEBALDconsult2-Jul-07 10:20 
AnswerRe: Script-generating commands? Pin
Mike Dimmick2-Jul-07 11:01
Mike Dimmick2-Jul-07 11:01 
GeneralRe: Script-generating commands? Pin
PIEBALDconsult2-Jul-07 11:45
mvePIEBALDconsult2-Jul-07 11:45 
QuestionDifference between sql server 2000 and 2005 Pin
Malayil alex2-Jul-07 8:16
Malayil alex2-Jul-07 8:16 
AnswerRe: Difference between sql server 2000 and 2005 Pin
Pete O'Hanlon2-Jul-07 9:40
mvePete O'Hanlon2-Jul-07 9:40 
AnswerRe: Difference between sql server 2000 and 2005 Pin
leckey2-Jul-07 11:45
leckey2-Jul-07 11:45 
QuestionSubquery returned more than 1 value Pin
Sam Heller2-Jul-07 5:47
Sam Heller2-Jul-07 5:47 
I am having issues with the following code ever since I added a subquery to it. The error tells me that more than one value was returned from the subquery. The query should in fact retrieve more than one value in most instances so this is fine. Thing is it stops the query from working and I don't know why. My code is as follows in it's entirety. Thanks for any help

SELECT<br />
		IH.InvoiceDate AS HistoryDate,<br />
		'Part of Invoice' AS HistoryType,<br />
		SI.SiteName AS HistoryBranch,<br />
		('Invoice Number - ' + IH.InvoiceNumber +  ' - ' + C.CustomerForeName + ' ' + C.CustomerSurname) AS HistoryReference,<br />
		(<br />
			SELECT TIP.InvoicePhoneIMEI <br />
			FROM tblInvoicePhones TIP <br />
			INNER JOIN tblInvoiceItems TII <br />
			ON TIP.InvoiceItemID = TII.InvoiceItemID <br />
			WHERE TII.InvoiceID = IH.InvoiceID<br />
		) As HistoryIMEIs,<br />
		(ST.StaffForeName + ' ' + ST.StaffSurname) AS HistoryUser<br />
FROM	tblInvoiceHeader IH<br />
		INNER JOIN tblInvoiceItems II<br />
		ON II.InvoiceID = IH.InvoiceID<br />
		INNER JOIN tblSites SI<br />
		ON IH.SiteID = SI.SiteID<br />
		INNER JOIN tblStaff ST<br />
		ON IH.StaffID = ST.StaffID<br />
		LEFT JOIN tblCustomers C<br />
		ON IH.CustomerID = C.CustomerID<br />
WHERE	II.StockID = '1750'<br />
AND		IH.InvoiceDate >= 'January 1, 2007'<br />
AND		IH.InvoiceDate <= 'July 2, 2007'<br />
AND		IH.SiteID = '10'<br />
AND		IH.InvoiceProForma = 0

AnswerRe: Subquery returned more than 1 value Pin
jonathan152-Jul-07 6:56
jonathan152-Jul-07 6:56 
GeneralRe: Subquery returned more than 1 value Pin
Sam Heller2-Jul-07 7:00
Sam Heller2-Jul-07 7:00 
GeneralRe: Subquery returned more than 1 value Pin
jonathan152-Jul-07 7:09
jonathan152-Jul-07 7:09 
GeneralRe: Subquery returned more than 1 value Pin
Sam Heller2-Jul-07 9:53
Sam Heller2-Jul-07 9:53 
AnswerRe: Subquery returned more than 1 value [modified] Pin
Harini N K3-Jul-07 0:58
Harini N K3-Jul-07 0:58 
GeneralRe: Subquery returned more than 1 value Pin
Praveen02928-Aug-07 0:29
Praveen02928-Aug-07 0:29 
AnswerRe: Subquery returned more than 1 value Pin
DQNOK3-Jul-07 5:05
professionalDQNOK3-Jul-07 5:05 
Questionsecure DB Pin
merwa2-Jul-07 0:21
merwa2-Jul-07 0:21 
AnswerRe: secure DB Pin
leckey2-Jul-07 11:48
leckey2-Jul-07 11:48 
AnswerRe: secure DB Pin
Mike Dimmick2-Jul-07 12:28
Mike Dimmick2-Jul-07 12:28 
QuestionMSAccess Pin
nitin32-Jul-07 0:19
nitin32-Jul-07 0:19 
AnswerRe: MSAccess Pin
martin_hughes2-Jul-07 0:29
martin_hughes2-Jul-07 0:29 
GeneralRe: MSAccess Pin
nitin32-Jul-07 0:37
nitin32-Jul-07 0:37 
AnswerRe: MSAccess Pin
Rahul.Goel2-Jul-07 21:41
Rahul.Goel2-Jul-07 21:41 
QuestionTime Out Error Pin
sajmera2-Jul-07 0:11
sajmera2-Jul-07 0:11 
AnswerRe: Time Out Error Pin
kubben2-Jul-07 2:18
kubben2-Jul-07 2:18 
Questiondisplay 2 table records in a single asp page Pin
dheema2-Jul-07 0:02
dheema2-Jul-07 0:02 

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.