Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sql server 2008 xml query syntax / semantics

Posted on 2012-04-10
5
Medium Priority
?
351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1000 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 1000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.

704 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