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 : 00:44:03
|
In the inquiry below 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 into Options field and replace any string of &lg or &gf with '' |
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-07 : 00:57:23
|
Send some records how you want?Raghu' S |
 |
|
javahf
Starting Member
34 Posts |
Posted - 2011-04-07 : 01:03:02
|
quote: Originally posted by raghuveer125 Send some records how you want?Raghu' S
Data looks like this now [</I>Handlebars:Riser + Oury Grips][</I>Size:55][Add Tire Set:No Extra Tire Set][Pedal Type:Standard,want it to look like [Handlebars:Riser + Oury Grips][Size:55][Add Tire Set:No Extra Tire Set][Pedal Type:Standard,need to get rid of < and /I>in the report |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|
|