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

Database

 
GeneralRe: Problems building Query Pin
John Kuhn22-Feb-04 7:54
John Kuhn22-Feb-04 7:54 
GeneralRe: Problems building Query Pin
xfitr222-Feb-04 8:25
xfitr222-Feb-04 8:25 
GeneralTriggers in windows application ^_^!!! Pin
solostar***19-Feb-04 20:15
solostar***19-Feb-04 20:15 
GeneralRe: Triggers in windows application ^_^!!! Pin
Mazdak20-Feb-04 1:11
Mazdak20-Feb-04 1:11 
GeneralSQL / PHP Problem Pin
LOSTTWARE.com19-Feb-04 18:18
LOSTTWARE.com19-Feb-04 18:18 
GeneralMSDE Connection String Pin
monrobot1319-Feb-04 15:40
monrobot1319-Feb-04 15:40 
GeneralRe: MSDE Connection String Pin
Mike Dimmick20-Feb-04 0:15
Mike Dimmick20-Feb-04 0:15 
GeneralProblem in Joining Two Tables Pin
Touseef Afzal19-Feb-04 10:23
Touseef Afzal19-Feb-04 10:23 
Hi Gurus:

i m new to database programing , so i m in problem even at first step ,

i have two tables (using MS Access as DBMS)

Purchase_Detail

OrderId | ProductID | QtyPurchased
1====== | == 1 ======== | == 20
1====== | == 2 ======== | == 20

And

Purchase_Return

OrderId == | == ProductID == | == QtyReturn
1 ======= | ====== 1 ====== | ==== 5

now i want to get the result from Product_Detail table as
using query


OrderId == | == ProductID == | == QtyPurchased
1 ======== | ===== 1 ======= | == 15
1 ======== | ===== 2 ======= | == 20

i m using the following query

SELECT Purchase_Detail.*
FROM Purchase_Detail LEFT JOIN Purchase_Return ON [Purchase_Detail].[pdOrderID] = [Purchase_Return].[prOrderID] AND
(Purchase_Detail.pdProductID = Purchase_Return.prProductID) AND (Purchase_Detail.pdOrderID = Purchase_Return.prOrderID)
WHERE (((Purchase_Detail.pdOrderID = '4')AND(Purchase_Return.prOrderID) Is Null));

the result of which is

OrderID == | == ProductID == | == QtyPurchased
1 ======== | ==== 2 ======== | ==== 20


missing the product ID 1 which has remaing 15 items in the stock....

can any one help me..

Thanks in advance.....

Seefou

GeneralRe: Problem in Joining Two Tables Pin
Edbert P19-Feb-04 12:43
Edbert P19-Feb-04 12:43 
GeneralRe: Problem in Joining Two Tables Pin
Touseef Afzal20-Feb-04 10:31
Touseef Afzal20-Feb-04 10:31 
GeneralRe: Problem in Joining Two Tables Pin
Edbert P22-Feb-04 17:41
Edbert P22-Feb-04 17:41 
GeneralTimeouts in C# Pin
19-Feb-04 5:49
suss19-Feb-04 5:49 
GeneralRe: Timeouts in C# Pin
Tom Larsen19-Feb-04 10:44
Tom Larsen19-Feb-04 10:44 
GeneralRe: Timeouts in C# Pin
Kwai Cheng Kane19-Feb-04 12:45
Kwai Cheng Kane19-Feb-04 12:45 
Questionneed sql query? Pin
murali_utr18-Feb-04 18:36
murali_utr18-Feb-04 18:36 
AnswerRe: need sql query? Pin
stefan b18-Feb-04 18:54
stefan b18-Feb-04 18:54 
GeneralRe: need sql query? Pin
murali_utr18-Feb-04 19:01
murali_utr18-Feb-04 19:01 
GeneralSimple Dataset Question... Pin
Verdant12318-Feb-04 16:45
Verdant12318-Feb-04 16:45 
GeneralRe: Simple Dataset Question... Pin
Gerald Leslie Jones19-Feb-04 18:59
Gerald Leslie Jones19-Feb-04 18:59 
GeneralRe: Simple Dataset Question... Pin
Verdant12319-Feb-04 19:06
Verdant12319-Feb-04 19:06 
GeneralRe: Simple Dataset Question... Pin
Bill Dean20-Feb-04 5:07
Bill Dean20-Feb-04 5:07 
GeneralRe: Simple Dataset Question... Pin
Verdant12322-Feb-04 3:01
Verdant12322-Feb-04 3:01 
GeneralParameters of PutElement() Pin
girl_lash18-Feb-04 16:26
girl_lash18-Feb-04 16:26 
Generalassociating child to parent Pin
ylaine18-Feb-04 16:05
ylaine18-Feb-04 16:05 
GeneralMissing VNSAPI32.dll Pin
Bakos, Zsolt18-Feb-04 9:50
Bakos, Zsolt18-Feb-04 9:50 

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.