Skip to Content
Sep 01, 2016 at 05:07 PM

Odd Script Behavior - SQL Queries


I have an odd one for you, fellow experts. In one of the lower environments on the project that I'm working at right now, IDM is suddenly being very picky about tables and view references in SQL queries when being executed from inside a script. Normally, when doing something like this:

select * from idmv_vallink_ext
where MSKEY = 12345

You can code the script like this:

var sql = "select * from idmv_vallink_ext where MSKEY = 12345";

However, for reasons we don't understand, any script using that kind of query is suddenly erring out saying that the table / view can't be found. When we go into the script and update the SQL to include the prefix, then it starts working again:

var sql = "select * from dbo.idmv_vallink_ext where MSKEY = 12345";

What would cause IDM to suddenly behave this way?