CodePudding user response:
Try adjust the compatibility level directly, if the fix, then only derivative according to to 2008The ALTER DATABASE database_name
The SET COMPATIBILITY_LEVEL=100
Of course, if statements can change, or change advice statement
CodePudding user response:
Compatibility level is 100, because from the old library upgrade, the default is 100, can be taobao sellers said, also said that is not the way to guide the scriptCodePudding user response:
Ufida U890 SQL support only sql2000, sql2005 with sql2008CodePudding user response:
Yes, 2018 when junction is year after year after year to upgrade to the SQL server 2017, so the problem in knot only met this yearCodePudding user response:
What is the details of the error message? The corresponding SQL syntax also stick?CodePudding user response:
Actually export - import data is not so difficult as you think, do not use the means of SQL script, you can through the import tool or link server data transfer,As long as the network and server IO performance on both sides ok good, should have no problem.
CodePudding user response:
Script like this:select hr_sys_setdict. Ctablecode From hr_sys_setdict, UFDATA_168_2019. Dbo. Hr_sys_setdict where hr_sys_setdict. Ctablecode like 'hr_ct %' and hr_sys_setdict. Ctablecode=UFDATA_168_2019. The dbo. Hr_sys_setdict. Ctablecode and hr_sys_setdict. Ctablecode not in (select distinct name From sysobjects where the name like 'hr_ct %' and xtype='V')
An error message is this:
Message 1013, level 16, state 1, line 1
The object "in the FROM clause UFDATA_168_2019. Dbo. Hr_sys_setdict" and "hr_sys_setdict" with the same name, please use the relevant name to distinguish them,
The above script in SQL server 2008 r2 is not an error, feel free to test table name change
CodePudding user response:
Just in SQL2008 R2 environment test LZ SQL script, complains of oh,
- confirm that the database environment
Select @ @ version
--> Return to the Microsoft SQL Server 2008 R2 (SP3) - 10.50.6000.34 (X64)...
- open the master database
Use the master
- create a table master. The dbo. Hr_sys_setdict
The create table hr_sys_setdict (ctablecode varchar (50))
- create a database UFDATA_168_2019
The create database UFDATA_168_2019
- open UFDATA_168_2019 database
Use UFDATA_168_2019
- create a table UFDATA_168_2019. Dbo. Hr_sys_setdict
The create table hr_sys_setdict (ctablecode varchar (50))
- open the master database
Use the master
- performs the query
The select hr_sys_setdict. Ctablecode
The From hr_sys_setdict, UFDATA_168_2019. Dbo. Hr_sys_setdict
Where hr_sys_setdict. Ctablecode like 'hr_ct %'
And hr_sys_setdict. Ctablecode=UFDATA_168_2019. Dbo. Hr_sys_setdict. Ctablecode
And hr_sys_setdict. Ctablecode not in (select distinct name from sysobjects where the name like 'hr_ct %' and xtype='V')
/*
Msg 1013, Level 16, State 1, Line 19
The objects "UFDATA_168_2019. Dbo. Hr_sys_setdict" and "hr_sys_setdict" in The FROM clause have The same exposed names.
Use the correlation names to distinguish them.
*/
CodePudding user response:
Recommend the following wording, in the name of the table after add alias a and b, SQL is not an error, also very easy to read.
The select a.c tablecode
A, the From hr_sys_setdict UFDATA_168_2019. Dbo. Hr_sys_setdict b
Where a.c tablecode like 'hr_ct %'
And a.c tablecode=biggest tablecode
And a.c tablecode not in (select distinct name from sysobjects where the name like 'hr_ct %' and xtype='V')
CodePudding user response:
Thank moderator patient answer, I just test again, why should I test in 2008 r2 is to support the wording, but version verification is not support, because I have a lot of local database, some libraries may come up from the old version, the default level of compatibility with 80 and 90, SQL server 2008 r2 corresponding is 100, and the new database is compatible with the level of 100, after the test in the level of compatibility is not supported by the 90 and 100, shows that this kind of writing is the sqlserver2000 way,If it is my own program, add an alias can deal with, but this is the friend u890 year knot tools code, don't change it, trouble,
CodePudding user response:
Advice consulting software provider, should be the solution.CodePudding user response:
Database seemed to drop the classCodePudding user response: