sql code: Invalid object name

SC 7.00.0007:

This sql code takes with sc_lookup() the following error:

(mssql): SELECT Periode, RH, WW, BS, CF, AF, JG, OM FROM dbo.ef_vwSCStdBerechnet WHERE (Periode = ‘2013001’) [HR][/HR]208: Invalid object name ‘dbo.ef_vwSCStdBerechnet’.

I created the query with the sql builder … there it goes.

Hello,

Please try:

SELECT Periode, RH, WW, BS, CF, AF, JG, OM FROM ef_vwSCStdBerechnet WHERE Periode = ‘2013001’

regards,
Bernhard Bernsmann

Hi Bernhard,

same error …

As I said, that’s in the sql builder ok or also in sql server management studio, just not in the scriptcase code. Strange …

Hi Bernhard,

… FROM <databasename>.dbo.ef_vwSCStdBerechnet … fix that :slight_smile:

For some reason SC didn’t picked up your DB… Is the connection you created pointing to the same database (to “<databasename>”)?

Also, are you working with SQL Server 2008? 2012? And what kind of connection are you using (ADO for instance)?

regards,
Bernhard Bernsmann

Hi Bernhard,

the general connection pointed to database A on a MySQL server. The error with sc_lookup pointed to database B on a MSSQL server 2008 r2 (in SC DBMS Typ = MSSQL Server, no ADO or other).