March 16, 2014 at 10:50 pm
HI Friends,
i m creating one google map application using asp.net with c# i had done also
now that marker ll be shown from database (lat,long)
depends on the lat,long i wanna display customer,sales,total sales for each makers in html table format
How to do that?
March 17, 2014 at 7:58 am
You could use this to produce simple html from a select statement:
declare @html nvarchar(max), @table nvarchar(max);
set @html =
N'<html><head><title>Doc Title Goes Here</title></head>' + CHAR(10)
+ N'<body style="font-family: Arial size:8pt">'
+ N'<h2>Heading Goes Here</h2>'
+ N'<table border="1" style="font-size:11px">'
+ N'<tr>'
+ N'<th >Column 1</th>'
+ N'<th >Column 2</th>'
+ N'<th >Column 3</th>'
+ N'</tr>' + CHAR(10);
select @table =
CONVERT(nvarchar(max),
(select
td = isnull(cast([Column 1] as varchar(100)), '')
,'' ,td = isnull(cast([Column 2] as varchar(100)), '')
,'' ,td = isnull(cast([Column 3] as varchar(100)), '')
from [Your Table]
where 1=1
FOR XML PATH(N'tr'), TYPE));
set @html = @html + @table + CHAR(10) + N'</table></body></html>';
select @html;
March 17, 2014 at 8:46 am
mcx5000 (3/17/2014)
You could use this to produce simple html from a select statement:
declare @html nvarchar(max), @table nvarchar(max);
set @html =
N'<html><head><title>Doc Title Goes Here</title></head>' + CHAR(10)
+ N'<body style="font-family: Arial size:8pt">'
+ N'<h2>Heading Goes Here</h2>'
+ N'<table border="1" style="font-size:11px">'
+ N'<tr>'
+ N'<th >Column 1</th>'
+ N'<th >Column 2</th>'
+ N'<th >Column 3</th>'
+ N'</tr>' + CHAR(10);
select @table =
CONVERT(nvarchar(max),
(select
td = isnull(cast([Column 1] as varchar(100)), '')
,'' ,td = isnull(cast([Column 2] as varchar(100)), '')
,'' ,td = isnull(cast([Column 3] as varchar(100)), '')
from [Your Table]
where 1=1
FOR XML PATH(N'tr'), TYPE));
set @html = @html + @table + CHAR(10) + N'</table></body></html>';
select @html;
Although that's excellent, it's not going to work for the OP. Look at the title of the post and see that the OP posted an SQL Server 2000 question in a 2008 forum.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy