Matthias von Zorn
Member
I know this is a little bit of a push for this forum, but sql is used a lot with hmis, so I figured id give it a shot.
I have the following tables.
OCDIST
INMAST
Currently I have a sql statment that only looks at ocdist.
SELECT ocdist.fpartno, ocdist.fcpartrev, ocidst.fcomment;
FROM ocdist;
WHERE ;
ORDER BY ;
INTO CURSOR Rpoctg
So I get...
Part x, 000, comment
Part y, 000 comment
Part z, 001 comment
, 000 comment
etc
I need the fDesciption field included from table INMAST.
Inmast has the fpartno as well. Id like this select statment
to pull the data with the descpition from inmast so I get
Part x, 000, comment, Desciption x
Part y, 000, comment, Desciption y, etc.
Ive tried
SELECT ocdist.fpartno, ocdist.fcpartrev, fcomment, inmast.fdesciption;
FROM ocdist inmast;
WHERE ocdist.fpartno == inmast.fpartno;
ORDER BY ;
INTO CURSOR Rpoctg
But it doesnt give me what I want, as it drops the occasional item that does not have a part number
Ive also tried using joins to no avail. This seems so simple. Can anyone give me some pointers? Thanks
matt
I have the following tables.
OCDIST
INMAST
Currently I have a sql statment that only looks at ocdist.
SELECT ocdist.fpartno, ocdist.fcpartrev, ocidst.fcomment;
FROM ocdist;
WHERE ;
ORDER BY ;
INTO CURSOR Rpoctg
So I get...
Part x, 000, comment
Part y, 000 comment
Part z, 001 comment
, 000 comment
etc
I need the fDesciption field included from table INMAST.
Inmast has the fpartno as well. Id like this select statment
to pull the data with the descpition from inmast so I get
Part x, 000, comment, Desciption x
Part y, 000, comment, Desciption y, etc.
Ive tried
SELECT ocdist.fpartno, ocdist.fcpartrev, fcomment, inmast.fdesciption;
FROM ocdist inmast;
WHERE ocdist.fpartno == inmast.fpartno;
ORDER BY ;
INTO CURSOR Rpoctg
But it doesnt give me what I want, as it drops the occasional item that does not have a part number
Ive also tried using joins to no avail. This seems so simple. Can anyone give me some pointers? Thanks
matt