New answers tagged

3

The best match to your requirement that I can think of is the Query Designer in SSMS. You can open the designer by right-clicking any table in your database and selecting "edit top 200 rows". Then, open the SQL pane by clicking the button in the toolbar: Now you can paste your statement in the SQL pane and use the syntax checker to convert the code: ...


2

This worked for me: EXEC master.dbo.sp_addlinkedserver @server = N'TestConnect' , @srvproduct=N'' , @provider=N'MSDASQL' , @provstr=N'DRIVER={SQL Server};SERVER=TestConnect;Trusted_Connection=no;' EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'TestConnect' , @useself=N'False' , @locallogin=NULL,@rmtuser=N'ReportReadOnly' , ...


0

You will need to change the syntax to: For XML Auto, Elements); because Row tag name is only allowed with RAW or PATH mode of FOR XML.


6

According to this MSDN article for using FOR XML in SQL Server 2000, "ELEMENTS Specifies that the columns are returned as subelements. Otherwise, they are mapped to XML attributes. This option is supported in AUTO mode only." So, your usage of ELEMENTS with the RAW option isn't supported in SQL Server 2000, but it does work with AUTO. Edit: If you were to ...



Top 50 recent answers are included