Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey,

 

Just wondering if anyone had any knowledge about data access using SQL commands with XML, under a C#.NET atmosphere. I'm using XML files to store and retrieve data...and I need to specific queries on this data. I'm new to this, so if anyone has any code samples of SQL commands...send them my way (rustyfancy@hotmail.com)

 

---Matt

Posted

You might be looking for the FOR XML clause. You can find all the documention on it either in the Books Online (BOL) or MSDN.

 

SELECT Customers.CustomerID, ContactName, CompanyName,

Orders.CustomerID, OrderDate

FROM Customers, Orders

WHERE Customers.CustomerID = Orders.CustomerID

AND (Customers.CustomerID = N'ALFKI'

OR Customers.CustomerID = N'XYZAA')

ORDER BY Customers.CustomerID

FOR XML AUTO

Gamer extraordinaire. Programmer wannabe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...