Click here to Skip to main content
15,891,777 members
Home / Discussions / Database
   

Database

 
GeneralRe: Variable column SQL statments Pin
Wombaticus8-Dec-13 12:39
Wombaticus8-Dec-13 12:39 
Questionms access select query? Pin
murali_utr8-Dec-13 4:17
murali_utr8-Dec-13 4:17 
AnswerRe: ms access select query? Pin
PIEBALDconsult8-Dec-13 4:38
mvePIEBALDconsult8-Dec-13 4:38 
QuestionRe: ms access select query? Pin
murali_utr8-Dec-13 4:47
murali_utr8-Dec-13 4:47 
AnswerRe: ms access select query? Pin
PIEBALDconsult8-Dec-13 5:04
mvePIEBALDconsult8-Dec-13 5:04 
QuestionBackup & restore of data Like organization chart in sqlserver Pin
mehdin698-Dec-13 1:46
mehdin698-Dec-13 1:46 
AnswerRe: Backup & restore of data Like organization chart in sqlserver Pin
Mycroft Holmes8-Dec-13 11:50
professionalMycroft Holmes8-Dec-13 11:50 
QuestionMYSQL - right join - where Pin
nelsonpaixao7-Dec-13 8:46
nelsonpaixao7-Dec-13 8:46 
Hello there guys,


i trying to perform some right join to keep all records from tbl custumers, it works fine but when i do the "where" condition i noticed it killed my right join
how can i solve this?
i have a way to get the output i want but is very messy, so i guessed u guys could help me here, i sure is very easy Dead | X|



SQL
select Customers.cname as c_id, sum(Products.price*Purchases.quantity) as z
from Purchases
right outer join Customers on (Customers.CID = Purchases.cust)
left outer join Stores on (Stores.SID = Purchases.Stores)
left outer join Products on (Products.SKU = Purchases.prod)
###where Stores.city = "Porto"
group by Customers.cname
order by z desc



(my aim is to show total value of purchaces per client in some store, but i need to include all client even those that didn´t shop (zero values))



thanks
nelsonpaixao@yahoo.com.br

trying to help & get help


modified 7-Dec-13 15:11pm.

AnswerRe: MYSQL - right join - where Pin
Mycroft Holmes7-Dec-13 12:22
professionalMycroft Holmes7-Dec-13 12:22 
Questionhow to make remote sql query analyzer in asp.net Pin
raj kumar tamang6-Dec-13 9:19
raj kumar tamang6-Dec-13 9:19 
AnswerRe: how to make remote sql query analyzer in asp.net Pin
Mycroft Holmes6-Dec-13 13:15
professionalMycroft Holmes6-Dec-13 13:15 
Questionms access 2007 update query? Pin
murali_utr5-Dec-13 22:08
murali_utr5-Dec-13 22:08 
AnswerRe: ms access 2007 update query? Pin
Eddy Vluggen5-Dec-13 22:26
professionalEddy Vluggen5-Dec-13 22:26 
AnswerRe: ms access 2007 update query? Pin
Dineshshp5-Dec-13 22:37
professionalDineshshp5-Dec-13 22:37 
GeneralRe: ms access 2007 update query? Pin
Jörgen Andersson5-Dec-13 22:54
professionalJörgen Andersson5-Dec-13 22:54 
QuestionINTERSECT vs SELF-JOINS Pin
Joe Woodbury5-Dec-13 12:16
professionalJoe Woodbury5-Dec-13 12:16 
AnswerRe: INTERSECT vs SELF-JOINS Pin
Mycroft Holmes5-Dec-13 13:15
professionalMycroft Holmes5-Dec-13 13:15 
AnswerRe: INTERSECT vs SELF-JOINS Pin
Jörgen Andersson5-Dec-13 21:31
professionalJörgen Andersson5-Dec-13 21:31 
AnswerRe: INTERSECT vs SELF-JOINS Pin
Richard Deeming6-Dec-13 1:43
mveRichard Deeming6-Dec-13 1:43 
QuestionFUNCTION mydatabase.sp_add_new_job_order does not exists Pin
Jassim Rahma5-Dec-13 0:15
Jassim Rahma5-Dec-13 0:15 
QuestionTrouble with date selection Pin
jkirkerx4-Dec-13 11:37
professionaljkirkerx4-Dec-13 11:37 
QuestionThe conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Pin
Member 104375991-Dec-13 8:07
Member 104375991-Dec-13 8:07 
AnswerRe: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Pin
RedDk1-Dec-13 9:35
RedDk1-Dec-13 9:35 
AnswerRe: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. PinPopular
Mycroft Holmes1-Dec-13 11:59
professionalMycroft Holmes1-Dec-13 11:59 
Questionprotect my database - your advsie plz Pin
Jassim Rahma1-Dec-13 5:19
Jassim Rahma1-Dec-13 5:19 

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.