× 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.



HI I have a file that it is a customer purchase file, they hold up to 5 items that were purchased and each record has the five items,model1, model2, model3, etc most of the time the last 4 are blank.
 
The need arose to produce a picking list by model number ordered rather than by invoice number which was easy enough to do, by making a logical on model1. however, there are sometimes promotions where if you purchase model A you get a free Model Z. This model Z is often gets placed as Model1 which obviously throws off the sort because the main partof the order would be model2 in that case.
 
I was wondering if in SQL I could do a shift if model1 = say 'Freebatteries' make model1 = model2 and model2=model1.
 
I have little control of this incoming data as it is a feed from an outsourced web site. So I have to do the reshuffling.
 
it could be done via a small RPG program but maybe in SQL it is faster and something to learn for me.
 
 



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.