Friday 6 April 2012

How to Bind Span Tag From Query

select
 '<span style="font-family:Tahoma, Geneva, sans-serif; color:#666666; font-size:14px; text-decoration:none;">'+ COnvert(varchar(10),row_number() over( order by Prod_id)) +'</span>' as [Sr.],

 '<span style="font-family:Tahoma, Geneva, sans-serif; color:#666666; font-size:14px; text-decoration:none;width:200px;">'+ (select name from Product_Master where Product_id=OBD.Prod_id) +'</span>' as Item
--(select name from Product_Master where Product_id=OBD.Prod_id) as Name,
 ,'<span style="font-family:Tahoma, Geneva, sans-serif; color:#666666; font-size:14px; text-decoration:none;width:50px; padding-left:5px;">'+ convert(varchar(10),Rate) +'</span>' as Rate
 ,'<span style="font-family:Tahoma, Geneva, sans-serif; color:#666666; font-size:14px; text-decoration:none;width:50px; padding-left:5px;">'+ convert(varchar(10),Tot_weight) +'</span>' as Qty
 ,'<span style="font-family:Tahoma, Geneva, sans-serif; color:#666666; font-size:14px; text-decoration:none; padding-left:5px; text-align: right;">'+ convert(varchar(10),Tot_Amount) +'</span>' as Amount
,Tot_Amount

FROM orderBookDetail OBD

No comments:

Post a Comment