SQL SERVER 撈出資料列的值串成一行文字

declare @s nvarchar(4000)
select @s=isnull(@s+’;’ , ”)+ cast(resal001 as nvarchar)
from resal
where substring(resal001,1,1) in (‘C’,’E’,’H’,’I’,’J’,’R’)
and resal001 not in (‘CSB’,’H90′)
print @s

網頁檢查是否安裝APP

<html>
<head>
<title>判斷是否有安裝APP,若無,則詢問是否下載</title>

Read the rest of this entry »

IIS LOG Parser語法

LOG Parser語法和SQL很像,出來的結果也和SQL很像有欄位、有列資料,

————————————————————————————-

Read the rest of this entry »

Javascript 去空白的語法

 

<SCRIPT LANGUAGE="JavaScript">
// Trim() , Ltrim() , RTrim()
String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } //去除頭尾空白
String.prototype.lTrim = function() { return this.replace(/(^\s*)/g, ""); }       //去除左側(頭)空白
String.prototype.rTrim = function() { return this.replace(/(\s*$)/g, ""); }       //去除右側(尾)空白
String.prototype.Trim= function() { return this.lTrim().rTrim(); }                //利用LTrim、RTrim來實做的trim
</SCRIPT>

Read the rest of this entry »

SQL Server – Database Mail 刪除Mail紀錄和郵件

**** 刪除Mail紀錄 ************************************************

–刪除所有Mail紀錄
exec sysmail_delete_log_sp

Read the rest of this entry »

« Older Entries   Newer Entries »