Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. FOR XML Path is giving error [modified]

FOR XML Path is giving error [modified]

Scheduled Pinned Locked Moved Database
databasehelpsql-servervisual-studiosysadmin
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi All, Can anybody please help me in executing a query using For Xml Path. Because query with this if I put it in my SQL Server editor, and run it, its giving errors. Is there any specific way to use For Xml Path. Or should I have anything to use it in my SQL Server 2008. Because any query from any browser is giving errors. What should i do to get rid of it. One more thing I found in my SQL Server is when I open the "new query" window in my SQL Server and try to write the "FOR XML" I get the RAW and Auto in the intellisense and I dont find the Path mode coming in the intellisense. Am I miising any dll or any installation process. Because if I write any query using "For Xml Path" not at all compiling. Can anybody help me in getting this done. I need to use the "For Xml Path", please help me out. Any links or any kind of help is very very welcoming. Thanks in advance.

    Thanks & Regards, Md. Abdul Aleem NIIT technologies

    modified on Tuesday, June 29, 2010 9:13 PM

    M I 2 Replies Last reply
    0
    • I indian143

      Hi All, Can anybody please help me in executing a query using For Xml Path. Because query with this if I put it in my SQL Server editor, and run it, its giving errors. Is there any specific way to use For Xml Path. Or should I have anything to use it in my SQL Server 2008. Because any query from any browser is giving errors. What should i do to get rid of it. One more thing I found in my SQL Server is when I open the "new query" window in my SQL Server and try to write the "FOR XML" I get the RAW and Auto in the intellisense and I dont find the Path mode coming in the intellisense. Am I miising any dll or any installation process. Because if I write any query using "For Xml Path" not at all compiling. Can anybody help me in getting this done. I need to use the "For Xml Path", please help me out. Any links or any kind of help is very very welcoming. Thanks in advance.

      Thanks & Regards, Md. Abdul Aleem NIIT technologies

      modified on Tuesday, June 29, 2010 9:13 PM

      M Offline
      M Offline
      Md Marufuzzaman
      wrote on last edited by
      #2

      Could you give us the error detail, transact sql statement as well.

      Thanks Md. Marufuzzaman


      I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.

      1 Reply Last reply
      0
      • I indian143

        Hi All, Can anybody please help me in executing a query using For Xml Path. Because query with this if I put it in my SQL Server editor, and run it, its giving errors. Is there any specific way to use For Xml Path. Or should I have anything to use it in my SQL Server 2008. Because any query from any browser is giving errors. What should i do to get rid of it. One more thing I found in my SQL Server is when I open the "new query" window in my SQL Server and try to write the "FOR XML" I get the RAW and Auto in the intellisense and I dont find the Path mode coming in the intellisense. Am I miising any dll or any installation process. Because if I write any query using "For Xml Path" not at all compiling. Can anybody help me in getting this done. I need to use the "For Xml Path", please help me out. Any links or any kind of help is very very welcoming. Thanks in advance.

        Thanks & Regards, Md. Abdul Aleem NIIT technologies

        modified on Tuesday, June 29, 2010 9:13 PM

        I Offline
        I Offline
        i j russell
        wrote on last edited by
        #3

        Is your database in 2000 compatibility mode? FOR XML PATH was introduced in 2005.

        I 1 Reply Last reply
        0
        • I i j russell

          Is your database in 2000 compatibility mode? FOR XML PATH was introduced in 2005.

          I Offline
          I Offline
          indian143
          wrote on last edited by
          #4

          I have run this exec to change the compatitbility "EXEC sp_dbcmptlevel Ppsapp, 90". But it is not accepting 90 the "SQL Server 2005" compatibility level. It is giving following error "Msg 15416, Level 16, State 1, Procedure sp_dbcmptlevel, Line 92 Usage: sp_dbcmptlevel [dbname [, compatibilitylevel]] Valid values of database compatibility level are 60, 65, 70, or 80.". Please give me your idea for changing the compatibility level. May be thats why the query is not working.

          Thanks & Regards, Md. Abdul Aleem NIIT technologies

          I 1 Reply Last reply
          0
          • I indian143

            I have run this exec to change the compatitbility "EXEC sp_dbcmptlevel Ppsapp, 90". But it is not accepting 90 the "SQL Server 2005" compatibility level. It is giving following error "Msg 15416, Level 16, State 1, Procedure sp_dbcmptlevel, Line 92 Usage: sp_dbcmptlevel [dbname [, compatibilitylevel]] Valid values of database compatibility level are 60, 65, 70, or 80.". Please give me your idea for changing the compatibility level. May be thats why the query is not working.

            Thanks & Regards, Md. Abdul Aleem NIIT technologies

            I Offline
            I Offline
            i j russell
            wrote on last edited by
            #5

            80 is Sql Server 2000, 70 is Sql Server 7 etc. You are connecting to a Sql Server 2000 instance not 2008. You cannot use FOR XML PATH. I suggest that you search google for "sql aggregate string concatenation". You may also find this link helps http://www.projectdmx.com/tsql/rowconcatenate.aspx[^]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups