× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Try this:

UPDATE AMFLIBK/ITEMASB A SET A.CMAT = (SELECT B.LCOST FROM AMFLIBK/ITEMBL B
WHERE A.ITNBR = B.ITNBR AND B.LCOST IS NOT NULL AND B.HOUSE = '1') WHERE
EXISTS (SELECT *FROM AMFLIBK/ITEMBL C WHERE A.ITNBR = C.ITNBR AND C.HOUSE =
'1')

My warehouse was actually in a test environment and it is 'MEX'.  Make sure
your warehouse is '1  ' or '  1' and not just '1' as the field is 3 alpha.

Ann

-----Original Message-----
From: mapics-l-bounces@xxxxxxxxxxxx
[mailto:mapics-l-bounces@xxxxxxxxxxxx]On Behalf Of James Staber II
Sent: Tuesday, March 08, 2005 12:58 PM
To: mapics-l@xxxxxxxxxxxx
Subject: RE:Updating CMAT costing




-----Original Message-----
Ann,

Thanks for the quick response

Here's the command that I wrote.  I think the intent is correct but my
methodology is flawed:

The following command errors out when trying to update CMAT with the NULL
value in table 2:

update amflibx/itemasb f1
set cmat = (select lcost from amflibx/itembl f2
where f1.itnbr = f2.itnbr and f2.house = '1')
where f1.itnbr in (select itnbr from amflibx/itemasa f3
where f3.ittyp <> 'K')

message: 4
date: Tue, 8 Mar 2005 09:10:11 -0600
from: "Ann Neal" <aneal@xxxxxxxxxxxxxxxxxx>
subject: RE: Updating CMAT costing

Jim,

Could you modify your SQL to exclude ITTYP <> 'K' type parts?  Can you paste
your old SQL in your response?

Ann

-----Original Message-----
From: mapics-l-bounce
On Behalf Of James Staber II
Sent: Tuesday, March 08, 2005 7:03 AM
To: MAPICS-L
Subject: Updating CMAT costing

Does anyone have an automated way of updating the CMAT field in ITEMASB with
the data from the LCOST field in ITEMBL?

We had a SQL command that we would run as required that worked fine until we
added a 'kit' item which has a NULL LCOST value which CMAT doesn't like.

Any suggestions would be greatly appreciated.

Thanks,

Jim



------------------------------

_______________________________________________
This is the MAPICS ERP System Discussion (MAPICS-L) digest list
To post a message email: MAPICS-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mapics-l.



End of MAPICS-L Digest, Vol 3, Issue 62
***************************************

_______________________________________________
This is the MAPICS ERP System Discussion (MAPICS-L) mailing list
To post a message email: MAPICS-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mapics-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.