摘要: http://blog.sqlauthority.com/2007/08/15/sql-server-insert-data-from-one-table-to-another-table-insert-into-select-select-into-table/SQL SERVER – Insert Data From One Table to Another Table – INSERT INTO SELECT – SELECT INTO TABLEAugust 15, 2007 by pinaldaveFollowing three questions are many time as. 阅读全文
posted @ 2011-07-28 18:07 higirle 阅读(298) 评论(0) 推荐(0) 编辑
摘要: http://blog.sqlauthority.com/2007/09/13/sql-server-difference-between-exec-and-execute-vs-exec-use-execexecute-for-sp-always/SQL SERVER – Difference Between EXEC and EXECUTE vs EXEC() – Use EXEC/EXECUTE for SP alwaysSeptember 13, 2007 by pinaldaveWhat is the difference between EXEC and EXECUTE?They. 阅读全文
posted @ 2011-07-28 15:17 higirle 阅读(312) 评论(0) 推荐(0) 编辑
摘要: ORDER BY items must appear in the select list if the statement contains a UNION, INTERSECT or EXCEPT operator.Solution 1:To fix this problem I put my Union statement into a derived table by doing the following.SELECT * FROM (SELECT Column1, Column2 FROM Table_AUNION ALLSELECT Column1, Column2 FROM . 阅读全文
posted @ 2011-07-28 15:04 higirle 阅读(537) 评论(0) 推荐(0) 编辑
摘要: LTRIM:http://msdn.microsoft.com/en-us/library/aa933237(v=sql.80).aspxLEFT (Transact-SQL) http://msdn.microsoft.com/en-us/library/ms177601.aspxRIGHT (Transact-SQL): http://msdn.microsoft.com/en-us/library/ms177532.aspxCHARINDEX (Transact-SQL) http://msdn.microsoft.com/en-us/library/ms186323.aspxPrin. 阅读全文
posted @ 2011-07-28 10:13 higirle 阅读(319) 评论(0) 推荐(0) 编辑
摘要: http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htmHow to pass a list of values or array to SQL Server stored procedure?Note: Information & code samples from this article are tested on SQL Server 2005 RTM (Yukon) and found to be working. Will update the article in case of any compat 阅读全文
posted @ 2011-07-28 10:08 higirle 阅读(2124) 评论(0) 推荐(0) 编辑