>I need to build a SQL Server SELECT. I need to get data on a number of employees. In VFP I would have something like
>
> WHERE INLIST (employee_id, 3456, 8888, 6543)
>
>What do I do in SQL Server?
>
>
>Thanks.
>
>
>Tim
Tim,
For small and hardcoded lists:
where employee_id in (3456,8888, 6543)
However generally lists are longer and or you do not want to hardcode them. Then using a join is a better solution. To do that you either create a temp table and fill in or use an existing one from an external source such as a VFP table. Join approach is important if you're doing this say for a remote view in VFP (though you asked in MSSQL section). Check:
Re: Joining remote table with local cursor Thread #
921514 Message #
921530Cetin