Toad World® Forums

TOAD, Teradata to SQL Server


#1

Good morning.

Still using TOAD, I have been tasked with hitting a SQL Server DB but had been hitting Teradata previously.

Simple query producing this error:

[Microsoft]{ODBC SQL Server Drive][SQL Server]Invalid object name ‘RiskAdjust_BHI.FACILITY_Proc’

Is there something different needed in syntax?

SELECT PROC_CD, FACR_HDR_BID, PROC_NUM, PROC_MOD_CD,
COUNT(*)
FROM RiskAdjust_BHI.FACILITY_PROC
GROUP BY PROC_CD, FACR_HDR_BID, PROC_NUM, PROC_MOD_CD
ORDER BY PROC_CD;

Any SQL folks out there with a suggestion, I would appreciate any support.

Thanks

WHP


#2

In SQL Server there is an additional qualification for the table owner. So:

RiskAdjust_BHI.FACILITY_Proc would be RiskAdjust_BHI.dbo.FACILITY_Proc or RiskAdjust_BHI.wpoling_953.FACILITY_Proc or whoever owns the table.


#3

I figuered it out, needed a dbo in between the DB name and the table name, sheesh.
Thanks

WHP


#4

T-SQL is, IMO, the easiest syntax (other than some date stuff), but the table owner qualification is a little weird.


#5

It looks like you are using ODBC to connect to SQL Server. You will get a lot more features in the product if you use the Native SQL Server connection. From the Connections Drop down choose SQL Server as the connection type.

You will get better code completion to help you with the syntax.

Debbie