Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sql server 2008 xml query syntax / semantics

Posted on 2012-04-10
5
Medium Priority
?
353 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:
Meir Rivkin 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:Meir Rivkin
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

971 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