Solved

sql server 2008 xml query syntax / semantics

Posted on 2012-04-10
5
340 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now