The Curse and Blessings of Dynamic SQL
Introduction If you follow the various newsgroups on Microsoft SQL Server, you often see people asking why they can’t do: SELECT * FROM @tablename SELECT @colname FROM tbl SELECT * FROM tbl WHERE x IN (@list) For all three examples you can expect someone to answer Use dynamic SQL and give a quick example on […]
Dynamic PIVOT queries in SQL Server
Problem Pivoting (or producing a “cross-tab”) is a common reporting requirement – data is stored in columns and you need to present it in rows. This was a nice feature that was added to SQL Server, but you don’t always know all of the values you need to pivot on.? In this tip we look […]
[추천 nuget] – Newtonsoft.Json
[ Json.NET is a popular high-performance JSON framework for .NET ] – Flexible JSON serializer for converting between .NET objects and JSON – LINQ to JSON for manually reading and writing JSON – High performance, faster than .NET’s built-in JSON serializers – Write indented, easy to read JSON – Convert JSON to and from […]
DataTable 을 Json 형태로 간단히 사용하기에 좋은 함수.
DataTable 을 Json 형태로 간단히 사용하기에 좋은 함수. *** .net 기준으로 ? ?System.Text.StringBuilder ?사용. public static string GetJSONString(DataTable Dt, string PgTable) { string[] StrDc = new string[Dt.Columns.Count]; string HeadStr = string.Empty; for (int i = 0; i < Dt.Columns.Count; i++) { StrDc[i] = Dt.Columns[i].Caption; HeadStr += “\”” + StrDc[i] + “\” : \”” + […]
최근 댓글