开发者

DATASTAGE- SQL Server from datastage: load table with strange name

I have a SQL Server table, whose name is like Vers-xxx_yyy. As you can see, there is a character "-".

I don't know why this table was made so, but I have to load it from datastage job.

So when I run my job, I obtain error "table doesn't exist".

I use odbc stage.

Directly on SQL Server it is possible to use syntax [Vers-xxx_yyy], but not in datastage.

This db already exists and it is used by other applications.

Is there a way to开发者_运维技巧 avoid/resolve the problem?


Try using double quotes over the table name. Also it is good practice not to use hyphen, instead you can use underscore


Try using a backslash \ to escape the - character - Vers\-xxx_yyy.


You should be able to put the table name in this form on the ODBC Connector too: [Vers-xxx_yyy]

Another solution would be to inform the SQL to query this table: SELECT * FROM [Vers-xxx_yyy]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜