我有一列可以说 10 个值,所有 NCHAR(20) 在 SQL Server 中。
我想以降序方式按第二个字母对值进行排序。换句话说,如果我有以下列值。请注意,这应该适用于任何值,这只是示例。
SQL 查询必须产生以下输出
我能得到的最接近的答案是这个——
选择行星,名称来自星系 WHERE 行星如 '_%' ORDER BY Planet desc
我希望能够将c#中的堆栈跟踪打印到txt文件中,如下所述.请注意以下内容:
FileHandler类内部代码并不重要.我想知道如何获取此处捕获的异常的堆栈跟踪.
try
{
//some code
}
// I just inherit from exception class (the message member, nothing big here)
catch (CustomException ex)
{
//I want to write the stacktrace here instead of the ex.Message
FileHandler.Write("DeveloperErrors.txt", "Stack Trace" + ex.Message, System.IO.FileMode.Append);
}
Run Code Online (Sandbox Code Playgroud)