bin location for supplier

I would like to use Bin Location for my Supplier. Can somebody help me out with a SQL Statement that would update this field according to ILC. For example, ILC = 12345 I would update Bin Location with Supplier ABC. ILC 78910 I would update Bin Location with Supplier XYZ. Craig

Reply to
Craig
Loading thread data ...

Reply to
Craig

Reply to
Akber Alwani

Hi Akber, Yes I want to use Bin Location to hold Manufacturer name. What I would like to do is use the first 6 numbers of my ILC's (which are all 11 digits) to determine which items get which manufacturer. In other words all ILC's that start with 045663 would have Four Paws assigned to those items bin location. I have started working on it but I'm not very good. This part works: UPDATE Item SET "BinLocation" = 'Four Paws' That sets all items bin location to Four Paws. The problem I'm having is with the WHERE clause. I tried: UPDATE Item SET "BinLocation" = 'Four Paws' WHERE {ItemLookupCode IS 045663*} but that doesn't work and I'm stumped. Any help you could give me would be appreciated. Craig

Reply to
Craig

Hi Craig -

Remember to backup first

Try

UPDATE item SET binlocation = 'Four Paws' WHERE itemlookupcode like '045663%';

The percent sign is your wildcard in SQL, so all items that start with

045663 as the first six characters will get their b> Hi Akber,
Reply to
convoluted

Thanks, I'll give it a try Craig

Reply to
Craig

I want to thank you again convoluted. I don't know if you intended for me to use the semi-colon or not, but once I removed it it worked like a charm. Craig

Reply to
Craig

Reply to
convoluted

hi Craig, I have one more solution may be you like. as the task you have to do for various no of items this statement then may run 1-2-5-10 times. I have done such kind of work in different way and let me tell you how. (I do not have manufaurer but brand) I created one table called brandmaster where I put the description of brand and a prefix for the brand this prefix is brand is attached with item. so in your case the prefix with the items belongs to Manufacture. Then I run the update query to update either the brandname or in your case the bin location with whatever data (you can use 3rd field to specify the manufacturer with its prefix 0123345 and then the data to be replace i.e. 'Four Paws') I used MS access program to add newly brands/manufacturer.

Table Name: create table Manufacurer(ManName nvarchar(30),prefix nvarchar(30),replacedata nvarchar(30)) insert into Manufacurer values ('Khateeb','KH','Khateeb Acessory') insert into Manufacurer values ('Car Mat','CM','Car Mat Dubai')

update item set b> I want to thank you again convoluted. I don't know if you intended for me to

Reply to
Akber Alwani

Reply to
Craig

Reply to
Akber Alwani

Akber, What is the other functionality, and what is the benefit of keeping this info in a new table? Thank you for your time. Craig

Reply to
Craig

Reply to
Akber Alwani

Akber, I think I understand but could you send me the detailed document so I can make sure I understand. Thanks again. Craig

Reply to
Craig

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.