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 |
javahf
Starting Member
34 Posts |
Posted - 2011-04-07 : 02:08:45
|
SELECT o.Orderid,o.OrderStatus,o.BillingLastName,o.BillingCity,o.BillingState,o.PaymentAmount,o.TotalShippingCost, o.SalesTax1 ,STUFF((SELECT ',' + ProductName FROM Orderdetails d WHERE o.Orderid = d.Orderid FOR XML PATH('')),1,1,'') as ProductName,STUFF((SELECT ',' + CAST(d.Options AS VARCHAR(100)) FROM Orderdetails d WHERE o.Orderid = d.Orderid FOR XML PATH('')),1,1,'')AS OptionsFROM Orders owhere o.OrderID > 1179How do I use Replace function to apply against the data extracted in the report into Options ( field) and replace any string containing &lg or &gf which is in my data with '' so report looks better . I am not sure where to put the REPLACE function and syntax . That would make the report so much better for us . |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|
|