T
The Rook
Sorry if this is simple but I am very new to SQL. I currently have a link
into our MRP database and am wanting to set up a query to show how many
technical drawings we have per part an the works orders they are allocated
to. Please find below the current SQL:
SELECT dbo_DRAWMOVE1.Drawing, dbo_DRAWREF1.Copies,
dbo_DRAWMOVE1.Copies_Moved, dbo_DRAWMOVE1.Move_Issue_Ref,
dbo_DRAWMOVE1.Movement_Type
FROM dbo_DRAWMOVE1 INNER JOIN dbo_DRAWREF1 ON dbo_DRAWMOVE1.Drawing =
dbo_DRAWREF1.Drawing;
The problem that I have got is when a drawing has been brought back it shows
as a negative in to Copies_moved so I have to go through all the positives
and chec is there is a negative then ignore them.
Is there anyway of just reporting distinct recordes from Move_issue_ref, ie
if it appears twice do not so it?
Hope that is clear
into our MRP database and am wanting to set up a query to show how many
technical drawings we have per part an the works orders they are allocated
to. Please find below the current SQL:
SELECT dbo_DRAWMOVE1.Drawing, dbo_DRAWREF1.Copies,
dbo_DRAWMOVE1.Copies_Moved, dbo_DRAWMOVE1.Move_Issue_Ref,
dbo_DRAWMOVE1.Movement_Type
FROM dbo_DRAWMOVE1 INNER JOIN dbo_DRAWREF1 ON dbo_DRAWMOVE1.Drawing =
dbo_DRAWREF1.Drawing;
The problem that I have got is when a drawing has been brought back it shows
as a negative in to Copies_moved so I have to go through all the positives
and chec is there is a negative then ignore them.
Is there anyway of just reporting distinct recordes from Move_issue_ref, ie
if it appears twice do not so it?
Hope that is clear