Change the schema to dbo. In SQL Server, schema is a container in the database, not the database itself. This may be different in MySQL, but in this case, your schema should be dbo (based on your comment about it working if you add "dbo." to your resultant query.