I apologize in advance if this is the wrong place for this question and ask a mod to move it to the appropriate forum.
We recently merged with another company and a former employee wrote some of their website including a function that will check a product code in the database to see if a "W" is anywhere in the code. The problem is it should only be checking the first position. We have other codes that have a "W" elsewhere to indicate a meeting in the western part of the state. Anyone know how to modify the following so it will only check the first letter of the product code?
if instr(ucase(rs("PRODUCT_CODE")), "W") > 0 then TYPEOFPROGRAM = "WEBINAR"
But you should consider moving this code into a stored procedureso that the database can be restructured if needed.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.