先建立一個 db_executor 並給予 EXECUTE 權限,再將需要添加的成員加入角色即可。
CREATE ROLE [db_executor]
GO
GRANT EXECUTE TO [db_executor]
GO
本區已經依照台灣網站內容分級規定加入分級標籤, 不歡迎也禁止未滿 18 歲的人員進入本區。 對多元文化的尊重, 也是對您自己, 以及您工作, 或許也包括對您親人的尊重。 如果您了解, 並可以尊重且遵守以上注意事項, 否則請您關閉並離開此板。 內容可能含有與男性間性行為有關的文字, 如果您無法接受男性間性行為, 或對男性間性行為沒有興趣, 請您選擇「離開」 |
先建立一個 db_executor 並給予 EXECUTE 權限,再將需要添加的成員加入角色即可。
CREATE ROLE [db_executor]
GO
GRANT EXECUTE TO [db_executor]
GO
MSDTC
啟用 MSDTC 服務
開始 → 控制台 → 系統管理工具 → 伺服器管理員
設定 → 服務 → Distributed Transaction Coordinator(分散式交易協調器) →
服務啟動類型為自動,服務狀態為已啟動
沒想到過這麼久,這裡還是有人會經過晃晃,離上次發文都已經是五年前的事了!
列印範圍
Separate Print Areas
var workbook = new XLWorkbook();
var ws1 = workbook.Worksheets.Add("Separate PrintAreas");
ws1.PageSetup.PrintAreas.Add("A1:B2");
ws1.PageSetup.PrintAreas.Add("D3:D5");
Page Breaks
/*取得日期區間內預設工作日*/
CREATE FUNCTION dbo.PL_getDefaultWorkingDays
(
@StartDate DATE,
@EndDate DATE
EOMONTH (Transact-SQL)
以選擇性位移,傳回包含指定日期的當月最後一天。
SQL Server 2012 版本新增加。
-------------------------------------------------------------------------------------------------------------------------------
使用方式
-------------------------------------------------------------------------------------------------------------------------------
/*
PL_setTempTable 'XX'
.* = application/octet-stream
.001 = application/x-001
.301 = application/x-301
.323 = text/h323
.906 = application/x-906
特殊符号 | 命名实体 | 十进制编码 | 特殊符号 | 命名实体 | 十进制编码 | 特殊符号 | 命名实体 | 十进制编码 |
Α | Α | Α | Β | Β | Β | Γ | Γ | Γ |
Δ | Δ | Δ | Ε | Ε | Ε | Ζ | Ζ | Ζ |
Η | Η | Η | Θ | Θ | Θ | Ι | Ι | Ι |
Κ | Κ | Κ | Λ | Λ | Λ | Μ | Μ | Μ |
Ν | Ν | Ν | Ξ | Ξ | Ξ | Ο | Ο | Ο |
Π | Π | Π | Ρ | Ρ | Ρ | Σ | Σ | Σ |
Τ | Τ | Τ | Υ | Υ | Υ | Φ | Φ | Φ |
Χ | Χ | Χ | Ψ | Ψ | Ψ | Ω | Ω | Ω |
α | α | α | β | β | β | γ | γ | γ |
δ | δ | δ | ε | ε | ε | ζ | ζ | ζ |
η | η | η | θ | θ | θ | ι | ι | ι |
κ | κ | κ | λ | λ | λ | μ | μ | μ |
ν | ν | ν | ξ | ξ | ξ | ο | ο | ο |
π | π | π | ρ | ρ | ρ | ς | ς | ς |
σ | σ | σ | τ | τ | τ | υ | υ | υ |
φ | φ | φ | χ | χ | χ | ψ | ψ | ψ |
ω | ω | ω | ϑ | ϑ | ϑ | ϒ | ϒ | ϒ |
ϖ | ϖ | ϖ | • | • | • | … | … | … |
′ | ′ | ′ | ″ | ″ | ″ | ‾ | ‾ | ‾ |
⁄ | ⁄ | ⁄ | ℘ | ℘ | ℘ | ℑ | ℑ | ℑ |
ℜ | ℜ | ℜ | ™ | ™ | ™ | ℵ | ℵ | ℵ |
← | ← | ← | ↑ | ↑ | ↑ | → | → | → |
↓ | ↓ | ↓ | ↔ | ↔ | ↔ | ↵ | ↵ | ↵ |
⇐ | ⇐ | ⇐ | ⇑ | ⇑ | ⇑ | ⇒ | ⇒ | ⇒ |
⇓ | ⇓ | ⇓ | ⇔ | ⇔ | ⇔ | ∀ | ∀ | ∀ |
∂ | ∂ | ∂ | ∃ | ∃ | ∃ | ∅ | ∅ | ∅ |
∇ | ∇ | ∇ | ∈ | ∈ | ∈ | ∉ | ∉ | ∉ |
∋ | ∋ | ∋ | ∏ | ∏ | ∏ | ∑ | ∑ | − |
− | − | − | ∗ | ∗ | ∗ | √ | √ | √ |
∝ | ∝ | ∝ | ∞ | ∞ | ∞ | ∠ | ∠ | ∠ |
∧ | ∧ | ⊥ | ∨ | ∨ | ⊦ | ∩ | ∩ | ∩ |
∪ | ∪ | ∪ | ∫ | ∫ | ∫ | ∴ | ∴ | ∴ |
∼ | ∼ | ∼ | ≅ | ≅ | ≅ | ≈ | ≈ | ≅ |
≠ | ≠ | ≠ | ≡ | ≡ | ≡ | ≤ | ≤ | ≤ |
≥ | ≥ | ≥ | ⊂ | ⊂ | ⊂ | ⊃ | ⊃ | ⊃ |
⊄ | ⊄ | ⊄ | ⊆ | ⊆ | ⊆ | ⊇ | ⊇ | ⊇ |
⊕ | ⊕ | ⊕ | ⊗ | ⊗ | ⊗ | ⊥ | ⊥ | ⊥ |
⋅ | ⋅ | ⋅ | ⌈ | ⌈ | ⌈ | ⌉ | ⌉ | ⌉ |
⌊ | ⌊ | ⌊ | ⌋ | ⌋ | ⌋ | ◊ | ◊ | ◊ |
♠ | ♠ | ♠ | ♣ | ♣ | ♣ | ♥ | ♥ | ♥ |
♦ | ♦ | ♦ | |   | ¡ | ¡ | ¡ | |
¢ | ¢ | ¢ | £ | £ | £ | ¤ | ¤ | ¤ |
¥ | ¥ | ¥ | ¦ | ¦ | ¦ | § | § | § |
¨ | ¨ | ¨ | © | © | © | ª | ª | ª |
« | « | « | ¬ | ¬ | ¬ | | ­ | ­ |
® | ® | ® | ¯ | ¯ | ¯ | ° | ° | ° |
± | ± | ± | ² | ² | ² | ³ | ³ | ³ |
´ | ´ | ´ | µ | µ | µ | " | " | " |
< | < | < | > | > | > | ' | ' |
子查詢
子查詢意指巢狀結構存在於SELECT、INSERT、UPDATE、DELETE敘述中的SELECT查詢。子查詢可在巢狀子查詢 ,子查詢為join關聯資料子查詢與無關聯資料使用in(某段SELECT資料來源),在效能表現上關連子查詢會較無 關聯子查詢表現較優。
-- 使用子查詢來檢查是否符合 --關連查詢 SELECT DISTINCT s.PurchaseOrderNumber FROM Sales.SalesOrderHeader s WHERE EXISTS ( SELECT SalesOrderID FROM Sales.SalesOrderDetail WHERE UnitPrice BETWEEN 1000 AND 2000 AND SalesOrderID = s.SalesOrderID) --無關連子查詢 SELECT SalesPersonID, SalesQuota CurrentSalesQuota FROM Sales.SalesPerson WHERE SalesQuota IN (SELECT MAX(SalesQuota) FROM Sales.SalesPerson)
查詢多個資料來源(JOIN)
If the results table of your stored proc is too complicated to type out the "create table" statement by hand, and you can't use OPENQUERY OR OPENROWSET, you can use sp_help to generate the list of columns and data types for you. Once you have the list of columns, it's just a matter of formatting it to suit your needs.
Step 1: Add "into #temp" to the output query (e.g. "select [...] into #temp from [...]").
The easiest way is to edit the output query in the proc directly. if you can't change the stored proc, you can copy the contents into a new query window and modify the query there.
Step 2: Run sp_help on the temp table. (e.g. "exec tempdb..sp_help #temp")
After creating the temp table, run sp_help on the temp table to get a list of the columns and data types including the size of varchar fields.
在遞迴時,有用到foreach
之前也習慣使用
結果看了幾篇文
發現原來一直看到的AsParallel是多重執行緒的方式
二話不說
☉目標:如果現在有a.html和b.html兩個網頁。b.html是以iframe的形式顯示在a.html中。我們要在a.html中,使用javascript取得b.html中的DOM元素。
a.html中的HTML:
<iframe id="iframepage" src="b.html" frameborder="0" ></iframe>
名稱:SQLite Database Browser
網站:http://sqlitebrowser.sourceforge.net/
分類:桌面程式(支援Win/Mac/Linux)
介紹:用Qt開發的Sqlite 小程式,功能相當簡單,但對於一般的資料庫建立和測試的確是夠用了。
截圖:
<
HTML
>
<
HEAD
>
<
TITLE
> Add/Remove dynamic rows in HTML table </
TITLE
>
<SCRIPT language="javascript">
在DOS系統下,有三類檔案是可以使DOS執行而進行某些工作,這三類檔案分別有以下三個不同的副檔名
1. .com (指令檔,命令檔) 例如 Command.com, Edit.com 等。
2. .exe (執行檔) 例如 Copy.exe, Mem.exe 等。
3. .bat (批次檔) 例如 Autoexec.bat 等。