SQL: Does a Field Exist?
In the FoxPro world, checking to see if a field exists can be done a number of ways: =AFIELDS(la)IF ASCAN(la,”FIELDNAME”)>0 ENDIF or IF TYPE(“FIELDNAME”) = “U” (I’m sure there are lots of other ways especially if you’re already working with a data dictionary tool) In T-SQL, there is no real equivalent however, you can do the same by using the INFORMATION_SCHEMA table. While there is no shortage of sites on the web that will show you similar code (like this one), I wanted to post it here for any VFP devs who may be switching between DBFs and SQL. IF …