Re: SQL help needed.
Posted in 1998
This is a multi-part message in MIME format. --------------142D6FAA70A92470D86AFF34 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sam Glattstein wrote: > I want to update all of records ( by their inventory numbers ) that I > apply these values to. This would be a type of batch update where all of > the inventory numbers that are entered would be updated with the values > entered for the given fields. If I have to update the same values every > time for 100 different inventory numbers it becomes extremely tedious. > The goal is to enter these values once and then enter the inventory > numbers that they will apply to for the update. > I have spent a lot of time trying to figure this out and I want to do it > only in this Informix SQL. Can anyone help? > > EXAMPLE: > > These are fields where the values will be input to: > > Salesman: [a1 ] > Date Given: [f015 ] > Date Sold: [f016 ] > Customer: [f017 ] > Cust. PO#: [f018 ] > Inv/memo#: [f014 ] > Inv or Memo: [c] (I,M,N,O) > > The values entered above should update records for the multiple > inventory numbers to be entered in this field : > > Inventory Number: [f000 ] > > > Sam Glattstein I would set up a batch window with all the possible Inventory Numbers pertinent to this function. Then let the user check off which numbers will be updated with the info. As each number is checked, concatenate this onto a where_clause. Then do the update with one sql statement using that where clause. Example: let where_clause = where_clause clipped," ", "and inventory_number = ", checked_num update table_name setting .... where_clause This is in pseudo code, but should give you the right direction on this. Look up correct syntax. --------------142D6FAA70A92470D86AFF34 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Mark Roach Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Mark Roach n: Roach;Mark org: Bob Jones University email;internet: mroach@bju.IT5_PO title: Informix Programmer x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------142D6FAA70A92470D86AFF34--