| Author |
Topic |
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2008-08-28 : 01:18:11
|
| Hi i want to generate the table data in xml format.when i write a query like thisSELECT Profile_Id as "@ProfileID", FRST_NAME as "First Name", LAST_NAME as "Last Name", USER_ID as "ID/User", EMAIL_ID as "Id/Email", GNDR as "Gender", CNTCT_NUM as "contact" FROM dbo.VTX_PRFLE_DTLFOR XML PATH(' '), ROOT('Details')it shows an error like theseMsg 170, Level 15, State 1, Line 6Line 6: Incorrect syntax near 'XML'..Can anyone help on this |
|
|
sunil
Constraint Violating Yak Guru
282 Posts |
Posted - 2008-08-28 : 01:39:00
|
| I copied your code in QA and it did not give any error on parsing. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-28 : 04:09:01
|
quote: Originally posted by swathigardas Hi i want to generate the table data in xml format.when i write a query like thisSELECT Profile_Id as "@ProfileID", FRST_NAME as "First Name", LAST_NAME as "Last Name", USER_ID as "ID/User", EMAIL_ID as "Id/Email", GNDR as "Gender", CNTCT_NUM as "contact" FROM dbo.VTX_PRFLE_DTLFOR XML PATH('SomeNameHere'), ROOT('Details')it shows an error like theseMsg 170, Level 15, State 1, Line 6Line 6: Incorrect syntax near 'XML'..Can anyone help on this
modify like above |
 |
|
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2008-08-28 : 04:23:06
|
| i modified it with a name..But it still shows the same error. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-28 : 04:31:08
|
| its working fine for me. B/w are you using sql 2005? |
 |
|
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2008-08-28 : 09:28:43
|
| Ya i'm using sql 2005 only.... but the error is still seen |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-28 : 09:39:33
|
| whats the compatibility level of your db? |
 |
|
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2008-08-29 : 09:07:17
|
| What do you mean by this compatibility level...I dint understand this term in regards to SQL server.How to check it |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-29 : 09:13:09
|
Read Books Online or search Google.Your current database can have a different compatibility level. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-29 : 10:14:35
|
| use sp_dbcmptlevel to check databse compatibility level |
 |
|
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2008-09-01 : 02:04:52
|
| hi the compatibility level of the database is 90.That is been shown |
 |
|
|
|