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

Database

 
GeneralRe: help with MySQL dynamic sql Pin
Richard MacCutchan29-Jul-12 9:10
mveRichard MacCutchan29-Jul-12 9:10 
AnswerRe: help with MySQL dynamic sql Pin
Eddy Vluggen29-Jul-12 9:41
professionalEddy Vluggen29-Jul-12 9:41 
Questionwcf Pin
PraveenSura27-Jul-12 18:36
PraveenSura27-Jul-12 18:36 
GeneralRe: wcf Pin
jschell28-Jul-12 6:44
jschell28-Jul-12 6:44 
AnswerRe: wcf Pin
Wes Aday28-Jul-12 9:11
professionalWes Aday28-Jul-12 9:11 
QuestionSQL - Finding same product in different waehouse where price is not the same Pin
Richard.Berry10026-Jul-12 1:24
Richard.Berry10026-Jul-12 1:24 
AnswerRe: SQL - Finding same product in different waehouse where price is not the same Pin
David Mujica26-Jul-12 2:12
David Mujica26-Jul-12 2:12 
GeneralRe: SQL - Finding same product in different waehouse where price is not the same Pin
Richard.Berry10026-Jul-12 4:47
Richard.Berry10026-Jul-12 4:47 
Thanks David

I had to add warehouse in the two select statements for warehouse '01' and warehouse '02' since they were referred to in the outer SELECT as below and now it works.

SELECT A.warehouse, A.product, A.standard_material,B.warehouse, B.product, B.standard_material FROM
(SELECT warehouse, product, standard_material FROM scheme_stockm WHERE warehouse = '01') AS A,
(SELECT warehouse, product, standard_material FROM scheme_stockm WHERE warehouse = '02') AS B
WHERE (A.product = B.product AND A.standard_material <> B.standard_material)
ORDER BY A.product, A.warehouse


I also got mine to work by adding an additional 'join' as below on stockm.product = A.product, but I prefer yours, since the result is one record per error, whereas mine is two records per error

SELECT stockm.warehouse, stockm.product, stockm.standard_material FROM
(SELECT product, standard_material FROM scheme_stockm WHERE warehouse = '01') AS A,
(SELECT product, standard_material FROM scheme_stockm WHERE warehouse = '02') AS B,
scheme_stockm AS stockm
WHERE (A.product = B.product AND A.standard_material <> B.standard_material AND stockm.product = A.product)
ORDER BY stockm.product, stockm.warehouse

GeneralCool Pin
David Mujica26-Jul-12 7:03
David Mujica26-Jul-12 7:03 
GeneralRe: SQL - Finding same product in different waehouse where price is not the same Pin
Michael Potter27-Jul-12 9:41
Michael Potter27-Jul-12 9:41 
GeneralRe: SQL - Finding same product in different waehouse where price is not the same Pin
Richard.Berry10028-Jul-12 6:35
Richard.Berry10028-Jul-12 6:35 
QuestionSearching Content of Documents in Database Pin
ASPnoob24-Jul-12 11:03
ASPnoob24-Jul-12 11:03 
AnswerRe: Searching Content of Documents in Database Pin
Eddy Vluggen24-Jul-12 12:32
professionalEddy Vluggen24-Jul-12 12:32 
AnswerRe: Searching Content of Documents in Database Pin
Mycroft Holmes24-Jul-12 14:16
professionalMycroft Holmes24-Jul-12 14:16 
QuestionRe: Searching Content of Documents in Database Pin
Eddy Vluggen24-Jul-12 23:29
professionalEddy Vluggen24-Jul-12 23:29 
AnswerRe: Searching Content of Documents in Database Pin
StianSandberg25-Jul-12 0:00
StianSandberg25-Jul-12 0:00 
AnswerRe: Searching Content of Documents in Database Pin
jschell25-Jul-12 7:26
jschell25-Jul-12 7:26 
AnswerRe: Searching Content of Documents in Database Pin
Michael Potter25-Jul-12 11:03
Michael Potter25-Jul-12 11:03 
GeneralRe: Searching Content of Documents in Database Pin
Mycroft Holmes25-Jul-12 13:00
professionalMycroft Holmes25-Jul-12 13:00 
GeneralRe: Searching Content of Documents in Database Pin
Peter_in_278025-Jul-12 14:17
professionalPeter_in_278025-Jul-12 14:17 
QuestionSET NOCOUNT Pin
Member 348763223-Jul-12 23:07
Member 348763223-Jul-12 23:07 
QuestionRe: SET NOCOUNT Pin
Eddy Vluggen24-Jul-12 0:18
professionalEddy Vluggen24-Jul-12 0:18 
AnswerRe: SET NOCOUNT Pin
Bernhard Hiller24-Jul-12 0:33
Bernhard Hiller24-Jul-12 0:33 
GeneralRe: SET NOCOUNT Pin
Member 348763224-Jul-12 0:48
Member 348763224-Jul-12 0:48 
AnswerRe: SET NOCOUNT Pin
Eddy Vluggen24-Jul-12 2:34
professionalEddy Vluggen24-Jul-12 2:34 

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.