A link to undocumented SQL Server 2000 system sp
Posted: February 22, 2008 Filed under: SQL Server Leave a commentMixed type column import from Excel to SQL Server(IMEX cure)
Posted: February 13, 2008 Filed under: SQL Server 2005 Leave a commentConcatenate strings with space from one column into single row
Posted: February 12, 2008 Filed under: SQL Server 2005 Leave a commentThis link provides couple of solutions to concatenate strings from a column into one single row. I like the For XML one with SQL Server 2005. However, you need to modify a little bit to concatenate columns with sentences in them.
(http://forums.asp.net/t/1217410.aspx)
Solution:
I append a tild"~" to your traceMessage column first(you can choose other symbol if that works for you):
SELECT *,
TraceMessages = REPLACE(
( SELECT traceMessage + ‘~’ AS [data()] FROM
TraceMessage
WHERE TraceMessage.applicationLogID = ApplicationLog.applicationLogID
ORDER BY traceMessageID
FOR XML PATH (”) ), ‘~’, ‘;’)
FROM ApplicationLog
ORDER
BY applicationLogID
Show border for the selected row in GridView
Posted: February 1, 2008 Filed under: ASP.NET 2 Leave a commentI have seen a solution provided by Mike Banavige in this thread(http://forums.asp.net/p/1211169/2134768.aspx#2134768).
Here is a variation of that solution for selected row with the addition of OnPreRender event:
Define CSS classes for the border of selected row’s cells and add the CSS classes in the OnPreRender event.
<head runat="server">
<title>SamplePage</title>
<style type="text/css">
.selectedRow td{border-top:3px solid yellow;border-bottom:3px solid yellow;}
.selectedRow td.first {border-left:3px solid yellow;}
.selectedRow td.last {border-right:3px solid yellow;}
</style>
</head>
<asp:GridView ID="GridView1" runat="server" OnPreRender="GridView1_OnPreRender" …>
Code:
protected void GridView1_OnPreRender(object sender, EventArgs e) { GridView gv = (GridView)sender; gv.Style["border-collapse"] = "seperate"; //add seperate to the style gv.Columns[0].ItemStyle.CssClass = "first"; gv.Columns[gv.Columns.Count - 1].ItemStyle.CssClass = "last"; gv.SelectedRowStyle.CssClass = "selectedRow"; }
(Copied from this thread: http://forums.asp.net/t/1212856.aspx)