Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
palak
Yak Posting Veteran
55 Posts |
Posted - 2008-05-07 : 13:20:58
|
| i have one sql function...but i want xml file for this function how can i get it? any help would be appreciated. thankscreate function campaignquantity(@campaign varchar(50), @startdate datetime, @enddate datetime)RETURNS TABLEASRETURN( Select distinct t.campaign, t.itemnmbr, t.sumquantity as totalquantity from (select distinct c.campaign, v.itemnmbr, sum(v.quantity) as sumquantity , p.indx From mySectionPubs P inner join mycampaign C on C.indx =P.indx and c.section_id = p.section_idinner join vwitemnmbrquantity v on v.itemnmbr=p.skuWhere c.campaign=@campaign and (v.docdate between @startdate and @enddate)group by v.itemnmbr, p.indx, c.campaign) t) |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-05-07 : 13:22:18
|
| select * from dbo.campaignquantity FOR XML AUTOlook up FOR XML in books online for more details and options_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-07 : 13:28:35
|
| you have different formats of bulidng XML. Refer this:-http://msdn.microsoft.com/en-us/library/ms345137.aspx |
 |
|
|
|
|
|