i want to update all this column in 1 execution.
any reply is highly appreciated.. thanku

UPDATE tblstoreitems SET price='499' WHERE TypeOrModel = 'A130';
UPDATE tblstoreitems SET price='599' WHERE TypeOrModel = 'A140';
UPDATE tblstoreitems SET price='1899' WHERE TypeOrModel = 'Alpha Style';
UPDATE tblstoreitems SET price='1699' WHERE TypeOrModel = 'Amethyst';
UPDATE tblstoreitems SET price='899' WHERE TypeOrModel = 'T18';
UPDATE tblstoreitems SET price='1499' WHERE TypeOrModel = 'Ace_f100';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='Aura Fusion';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='Axis';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='B100';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='B5';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='B8';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='Breeze';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='Breeze 2';
UPDATE tblstoreitems SET price='499' WHERE TypeOrModel ='Bubble';

Recommended Answers

It could be possible if you have an another "Price" Table.
The SQL Statement would be like
UPDATE tblstoreitems SET tblstoreitems.price= SELECT tblitemprices.price FROM tblitemprices WHERE tblitemprices.TypeOrModel = tblstoreitems.TypeOrModel ORDER BY tblstoreitems.TypeOrModel;

Here tblitemprices is a table for price list with two fields.

Jump to Post

It is possible when you have a table for price list. To update a table from outside everytime you must create a sql statement on every TypeOrModel field value.

Jump to Post

All 5 Replies

any reply please.

It could be possible if you have an another "Price" Table.
The SQL Statement would be like
UPDATE tblstoreitems SET tblstoreitems.price= SELECT tblitemprices.price FROM tblitemprices WHERE tblitemprices.TypeOrModel = tblstoreitems.TypeOrModel ORDER BY tblstoreitems.TypeOrModel;

Here tblitemprices is a table for price list with two fields.

isnt it the same that your going to assign statistically.it looks like the same thought

It is possible when you have a table for price list. To update a table from outside everytime you must create a sql statement on every TypeOrModel field value.

as what i can see The statement is error. thanks a lot for the reply.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.