Hello,
I'm attempting to connect Stata to a SQL Server database. I can query the table in SQL Server Management Studio and in Tableau, so I don't believe it's a permissions issue.
I've tried:
odbc load, exec("SELECT * FROM student_metrics_c;") dsn("ODS_PROD")
and
odbc load, exec("SELECT * FROM student_metrics_c;") dsn("ODS_PROD") dialog(prompt), then re-indicating the directory in the dialog
as well as going through stepwise:
odbc query "ODS_PROD"
odbc desc "student_metrics_c"
odbc load, exec("SELECT * FROM student_metrics_c;") dsn("ODS_PROD")
This last approach shows me all the available tables within ODS_PROD, then all the available fields on my table (student_metrics_c), but then gives the same error as the others.
With each, I get the error:
The ODBC driver reported the following diagnostics
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'student_metrics_c'.
SQLSTATE=42S02
r(682);
At this point, I'm out of ideas. Any help would be very, very much appreciated!
Vanessa
I'm attempting to connect Stata to a SQL Server database. I can query the table in SQL Server Management Studio and in Tableau, so I don't believe it's a permissions issue.
I've tried:
odbc load, exec("SELECT * FROM student_metrics_c;") dsn("ODS_PROD")
and
odbc load, exec("SELECT * FROM student_metrics_c;") dsn("ODS_PROD") dialog(prompt), then re-indicating the directory in the dialog
as well as going through stepwise:
odbc query "ODS_PROD"
odbc desc "student_metrics_c"
odbc load, exec("SELECT * FROM student_metrics_c;") dsn("ODS_PROD")
This last approach shows me all the available tables within ODS_PROD, then all the available fields on my table (student_metrics_c), but then gives the same error as the others.
With each, I get the error:
The ODBC driver reported the following diagnostics
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'student_metrics_c'.
SQLSTATE=42S02
r(682);
At this point, I'm out of ideas. Any help would be very, very much appreciated!
Vanessa
Comment