Hello Statalist ,

I am using Stata 17 on Windows. I am new to the ODBC process and I am trying to call in a large dataset from SQL. The dataset is mostly string variables, including the year variable. I have been successful with smaller datasets--they were able to load fairly quickly and I could manipulate the variables.
The code that works is:

Code:
odbc load, table("MySmallTable")
I want choose what data is loaded based on year to make it more manageable. The code I am trying (without luck) is:

Code:
odbc load if year=="2015", table("MyTable) dsn("DataSource")
Is there a way to:

a) destring all the variables prior to loading to make the data more manageable
b) a way to destring just one variable (in this case year) so that I could try if year>2015
c) a way to indicate which specific values of year I want. for example if year=="2015" & "2016" & "2017"

Thank you so much in advance!
I am not able to share screenshots or the data due to the confidential nature of the data (accessed through a secure lab).