Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Select Query

Author  Topic 

scott_hanebutt
Starting Member

10 Posts

Posted - 2009-06-08 : 14:56:54
I have two tables that contain the following fields.

INMAST.FPARTNO
INMAST.FPRODCL

INPRSC.FSCHECODE
INPRSC.FADJUST1
INPRSC.FADJUST2
INPRSC.FADJUST3
INPRSC.FADJUST4

INMAST.FPARTNO = INPRSC.FSCHECODE

The 18 and 19 FPRODCL contain many FPARTNO's that are identical to each other except that the 18 FPRODCL has '18' somewhere in the FPARTNO and the 19 PRODCL has '19' somewhere in the FPARTNO.

I want to find all acurances when a 18 part has a higher value then then the 19 part in the same FADJUST field.

Any help would be greatly appreciated. I realize that my database design is not very good but that is what I have to work with.

Thank you,
Scott

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-06-08 : 15:48:52
Sorry - I've got no clue what the problem is. Please follow the instructions in this link to post DDL, sample DML and expected results.

http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -