Solved

sql server 2008 xml query syntax / semantics

Posted on 2012-04-10
5
341 Views
Last Modified: 2012-04-11
I have some questions about this snippet of code:

If Exists
(SELECT 1
FROM Common.XmlArrayOfInt(@ListingIDs) IDs

Is XmlArrayOfInt a built-in TSQL function? If so, how does it work and what does it do both generally and in this instance? I have some experience (~1.5-years) with db-programming, but I currently don't know XML nor have I ever seen XML used within sql-server queries. Please explain as much as possible.

Thanks!
0
Comment
Question by:pae2
5 Comments
 
LVL 14

Expert Comment

by:nishant joshi
ID: 37830944
you can load xml to temp table and then use it.after use drop it.
0
 
LVL 42

Accepted Solution

by:
sedgwick earned 250 total points
ID: 37831298
XmlArrayOfInt is not a built-in function in tsql or sql in general.
it seems that XmlArrayOfInt is a user defined function which i assume accept list of ids (probably string generated ids).
try look for this function in your DB, i should be under <DB>->Programmability->Functions->Scalar-valued Functions
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
ID: 37832279
try look for this function in your DB, i should be under <DB>->Programmability->Functions->Scalar-valued Functions
Make that Programmability->Functions->Table-valued Functions
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 37832329
any progress?
0
 

Author Closing Comment

by:pae2
ID: 37832533
sedgwick, thanks for the explanation. it helped. acperkins, thanks. you were right. it was in Table-valued Functions.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question