从 ADODB.RecordSet 获取数据时遇到一些排序规则(?)问题。使用 SQL Management Studio 进行选择时,一切看起来都很好
PriceMonitoring Справочник конкурентов2_Temp Table 6142061 dbo
Buuut,当我从 powerdesigner 的 vbscript 获取数据时,我得到的表名不匹配,例如
Table
Not in Model dbo.Ni?aai?iee eiieo?aioia2_Temp
Not in DB dbo.Справочник конкурентов2_Temp
目前,我已经尝试在我的 sql 脚本中指定不同的排序规则(COLLATE SQL_Latin1_General_CP1_CI_AS、Cyrillic_General_CI_AS、Ukrainian_CI_AS)。我什至更改了数据库排序规则,这无济于事,也对结果没有影响。任何想法,社区?
那是sql脚本的一部分。
SET NOCOUNT ON
USE DB_Control
SELECT ds.*, isnull(upo.Object_Name,'') as Object_Name_Updated, isnull(tuo.Object_Name,'') as Object_Name_Uncontrol
FROM
--
dbo.Design_Checksum AS ds
--
LEFT JOIN dbo.Uncontrolled_Object AS uo
ON uo.DB_Name = ds.DB_Name
AND uo.Object_Type_ID = ds.Object_Type_ID
AND uo.Schema_Name = ds.Schema_Name
AND uo.Object_Name COLLATE SQL_Latin1_General_CP1_CI_AS = ds.Object_Name COLLATE SQL_Latin1_General_CP1_CI_AS
--
LEFT JOIN dbo.Updated_Object AS upo
ON upo.DB_Name = ds.DB_Name
AND upo.Object_Type_ID = ds.Object_Type_ID
AND upo.Schema_Name = ds.Schema_Name
AND upo.Object_Name COLLATE SQL_Latin1_General_CP1_CI_AS = ds.Object_Name COLLATE SQL_Latin1_General_CP1_CI_AS
--
LEFT JOIN PD.Test_Uncontrolled_Object AS tuo
ON tuo.DB_Name = ds.DB_Name
AND tuo.Object_Type_ID = ds.Object_Type_ID
AND tuo.Schema_Name = ds.Schema_Name
AND tuo.Object_Name COLLATE SQL_Latin1_General_CP1_CI_AS = ds.Object_Name COLLATE SQL_Latin1_General_CP1_CI_AS
AND (tuo.Date_End IS NULL
OR tuo.Date_End > GETDATE())
WHERE
ds.DB_Name = 'PriceMonitoring'
AND uo.Object_Name IS NULL
ORDER BY
UPPER(REPLACE(ds.Object_Type_ID, '_', '!')),
UPPER(REPLACE(ds.Schema_Name, '_', '!')),
UPPER(REPLACE(ds.Object_Name, '_', '!'))