是吗,我早试过了,怎么报的错还是一样。我的语句是这样写的:select * from orders for xml auto.数据库是pubs.
pubs does not have an orders table, try NorthWind, or you want to use pubs, try select * from authors for xml auto
are you sure? if so, then something is seriously wrong with your SQL Server 2000. Last tryuse pubs go select * from authors for xml auto go use NorthWind go select * from orders for xml auto go
我用select * from authors正常显示,但加上for xml auto就报 服务器: 消息 170,级别 15,状态 1,行 1 Line 1: Incorrect syntax near 'xml'. 难道我的sqlsever2000有问题吗,我是在保留sqlsever 7的基础上装的。
select * from tablenamefor xml auto
谢谢wym93519924、saucer、hater,我重装SQl SERVER2000就正常了。看来在升级时不该保留SQl SERVER 7。
select * from authors for xml auto
go
select * from authors for xml auto
go
use NorthWind
go
select * from orders for xml auto
go
服务器: 消息 170,级别 15,状态 1,行 1
Line 1: Incorrect syntax near 'xml'.
难道我的sqlsever2000有问题吗,我是在保留sqlsever 7的基础上装的。