Click here to Skip to main content
14,331,729 members
   

Database

 
QuestionQuerying from multiple tables at the same time - related to correlated subqueries Pin
Member 142180367-Apr-19 5:12
memberMember 142180367-Apr-19 5:12 
AnswerRe: Querying from multiple tables at the same time - related to correlated subqueries Pin
Mycroft Holmes7-Apr-19 12:08
memberMycroft Holmes7-Apr-19 12:08 
AnswerRe: Querying from multiple tables at the same time - related to correlated subqueries Pin
Eddy Vluggen8-Apr-19 0:44
mveEddy Vluggen8-Apr-19 0:44 
AnswerRe: Querying from multiple tables at the same time - related to correlated subqueries Pin
CHill6011-Apr-19 6:48
protectorCHill6011-Apr-19 6:48 
QuestionHELP WITH SQL QUERY Pin
BrunoPigeon4-Apr-19 17:37
memberBrunoPigeon4-Apr-19 17:37 
AnswerRe: HELP WITH SQL QUERY Pin
Mycroft Holmes4-Apr-19 20:38
memberMycroft Holmes4-Apr-19 20:38 
GeneralRe: HELP WITH SQL QUERY Pin
BrunoPigeon4-Apr-19 20:56
memberBrunoPigeon4-Apr-19 20:56 
GeneralRe: HELP WITH SQL QUERY Pin
GuyThiebaut4-Apr-19 21:06
professionalGuyThiebaut4-Apr-19 21:06 
Read up on what the UNION command does.

I could tell you what is not working here but you will find out much more if you read, understand than methodically practise what you have read and understood rather than throwing things together hoping they will work then asking for help when they don't work.

What the heck, I will tell you anyway - either change ITotal to sTotal or change sTotal to ITotal.
The column names for the unioned results need to be the same.

As an aside - I don't think that query is going to give you any information that is of any use as you are basically listing sales totals and dates together with invoice totals and dates with no ability to distinguish between what is a sales row and what is an invoice row.

I think you need to step away from the computer, read a book, follow tutorials and work out what you want to do on paper before typing SQL queries that you hope will somehow work.
“That which can be asserted without evidence, can be dismissed without evidence.”

― Christopher Hitchens

GeneralRe: HELP WITH SQL QUERY Pin
BrunoPigeon4-Apr-19 21:10
memberBrunoPigeon4-Apr-19 21:10 
GeneralRe: HELP WITH SQL QUERY Pin
GuyThiebaut4-Apr-19 21:20
professionalGuyThiebaut4-Apr-19 21:20 
GeneralRe: HELP WITH SQL QUERY Pin
GuyThiebaut4-Apr-19 21:43
professionalGuyThiebaut4-Apr-19 21:43 
AnswerRe: HELP WITH SQL QUERY Pin
GuyThiebaut4-Apr-19 20:56
professionalGuyThiebaut4-Apr-19 20:56 
GeneralRe: HELP WITH SQL QUERY Pin
BrunoPigeon4-Apr-19 20:58
memberBrunoPigeon4-Apr-19 20:58 
GeneralRe: HELP WITH SQL QUERY Pin
Mycroft Holmes4-Apr-19 21:16
memberMycroft Holmes4-Apr-19 21:16 
GeneralRe: HELP WITH SQL QUERY Pin
GuyThiebaut4-Apr-19 21:24
professionalGuyThiebaut4-Apr-19 21:24 
GeneralRe: HELP WITH SQL QUERY Pin
BrunoPigeon5-Apr-19 0:13
memberBrunoPigeon5-Apr-19 0:13 
GeneralRe: HELP WITH SQL QUERY Pin
GuyThiebaut4-Apr-19 21:17
professionalGuyThiebaut4-Apr-19 21:17 
GeneralRe: HELP WITH SQL QUERY Pin
BrunoPigeon5-Apr-19 0:11
memberBrunoPigeon5-Apr-19 0:11 
GeneralRe: HELP WITH SQL QUERY Pin
GuyThiebaut5-Apr-19 2:48
professionalGuyThiebaut5-Apr-19 2:48 
GeneralRe: HELP WITH SQL QUERY Pin
BrunoPigeon5-Apr-19 4:22
memberBrunoPigeon5-Apr-19 4:22 
QuestionIn Access: group of records and assign conditional group ? Pin
Member 245846726-Mar-19 22:18
memberMember 245846726-Mar-19 22:18 
AnswerRe: In Access: group of records and assign conditional group ? Pin
Victor Nijegorodov27-Mar-19 11:50
memberVictor Nijegorodov27-Mar-19 11:50 
GeneralRe: In Access: group of records and assign conditional group ? Pin
Member 24584677-Apr-19 16:20
memberMember 24584677-Apr-19 16:20 
GeneralRe: In Access: group of records and assign conditional group ? Pin
Member 24584677-Apr-19 16:24
memberMember 24584677-Apr-19 16:24 
AnswerRe: In Access: group of records and assign conditional group ? Pin
Chris Quinn28-Mar-19 1:55
memberChris Quinn28-Mar-19 1:55 

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.