>Hi,
>
>I have a case where I need to select records when one of three integer fields equals to some set value. For example, say table has fields Fld1 (Int), Fld2 (int), Fld3 (int). I want to find all records where a one of the fields has value nNumber. So the way I could do it as:
>
>
>select * from MyTable where Fld1 = nNumber or Fld2 = nNumber or Fld3 = nNumber
>
>
>Is there a faster approach that would hopefully work in both VFP and SQL Server? Note that the table has an index on Fld1, and Fld2, and Fld3.
>
>TIA.
One thing that comes to mind is that, if you have three fields with the same type of information, you might be better off storing the information in a single field, and in separate records (perhaps in another table). This is basic data normalization, but of course, I don't know exactly what information your fields hold.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)