General information
Forum:
Microsoft SQL Server
Category:
Database management
Title:
Result Data different in SQL 7.0 to SQL 2000
hi all,
I just installed SQL Server 2000. when i ran following query in this server:
select left(a.name,20) sysObjectsName,a.length, left (b.name, 40) sysTypesName from syscolumns a,systypes b where id =
(select id from sysobjects where name = 'tbl_Increment') and a.xusertype = b.xusertype
I got the following result in SQL 2000:
sysObjectsName length sysTypesName
-------------------- ------ ----------------------------------------
OriginId 2 originid
AppId 4 appid
Increment 1 tinyint
IncrementPercent 1 tinyint
udf_varchar1 50 varchar
udf_varchar2 50 varchar
udf_datetime1 8 datetime
udf_datetime2 8 datetime
udf_float1 8 float
udf_float2 8 float
udf_integer1 4 int
udf_integer2 4 int
kdeid 8 char
kdedate 8 datetime
(14 row(s) affected)
but when i added another user table "adodatatype" in this query
select left(a.name,20) sysObjectsName,a.length, left (b.name, 40) systypesname,C.adofieldvalue from syscolumns a,systypes b,adodatatype C where id =
(select id from sysobjects where name = 'tbl_Increment') and a.xusertype = b.xusertype
and C.sqlfieldtype = b.Name
I got the following result in Sql Server 2000:
sysObjectsName length systypesname adofieldvalue
-------------------- ------ -------------------- ----------------
udf_varchar1 50 varchar 200
udf_varchar2 50 varchar 200
AppId 4 appid 3
kdeid 8 char 129
udf_integer1 4 int 3
udf_integer2 4 int 3
Increment 1 tinyint 16
IncrementPercent 1 tinyint 16
OriginId 2 originid 129
udf_datetime1 8 datetime 135
udf_datetime2 8 datetime 135
kdedate 8 datetime 135
udf_float1 8 float 5
udf_float2 8 float 5
(14 row(s) affected)
so my column position is changed in result pan
but the same query in SQL server 7.0 gave me the follwing result and i also want the position of columns should be the same as this result
how can we do that.
what setting i have to set in SQL server 2000 to get this.
in SQL Server 7.0:
sysObjectsName length systypesname adfieldvalue
------ ---------------------------------------- --------------------
OriginId 2 originid 129
AppId 4 appid 3
Increment 1 tinyint 16
IncrementPercent 1 tinyint 16
udf_varchar1 50 varchar 200
udf_varchar2 50 varchar 200
udf_datetime1 8 datetime 135
udf_datetime2 8 datetime 135
udf_float1 8 float 5
udf_float2 8 float 5
udf_integer1 4 int 3
udf_integer2 4 int 3
kdeid 8 char 129
kdedate 8 datetime 135
(14 row(s) affected)
Thanks
...ashish
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only