Viewing 15 posts - 151 through 165 (of 168 total)
Yes Recursive queries add a lot easiness to the t-sql development.
I had built a recursive split function, a numbers table, etc.
Or you can query on hierarchical data on a singe...
June 8, 2009 at 8:32 am
Hello,
Actually the definition of a stored procedure includes that it is formed of a number of sql statements forming a batch of t-sql statements.
You can even call numbers of other...
June 8, 2009 at 8:15 am
Hello,
I think we can also handle this taks by using the sp_MSForEachTable and sp_MSForEachDB un-documented stored procedures .
April 20, 2009 at 2:29 am
Hi jac,
What you see as data type by calling the sys proc sp_columns in the type_name column is the backward compatible ODBC type of the related sql type.
Eralper
April 7, 2009 at 4:38 am
Hello,
I could not actually understand what you are expecting but you can review to the new Grouping Sets improvement in SQL2008 or for using Rollup and Cube in your groupings.
You...
April 7, 2009 at 4:25 am
Hello,
I have created two select statements listing accessed databases and non-accessed databases according to the processes running on the SQL Server for SQL2005 or SQL2008
Here is the two select statements
with...
April 2, 2009 at 6:21 am
Hello all,
I agree with Matt since a select count(*) is not quickly handled operation if you do not have indexes on a huge table. So if the source table we...
December 24, 2008 at 4:26 am
Hi,
In the readme file I saw the below note. I'm not sure but may be helpfull.
If you decide to take the described action, please take your backups. I did not do the...
May 9, 2005 at 6:20 am
Hi David,
As far as I know you can only use a CTE just after you define it.
Eralper
March 7, 2005 at 12:17 am
Hi,
I don't know the term "forward-referenced", sorry.
Today a new article of Srinivas is published under the link,
http://www.sqlservercentral.com/columnists/sSampath/recursivequeriesinsqlserver2005.asp
This article summarizes the recursive usage of common table expressions very well with...
March 3, 2005 at 8:37 am
Hi Jamie,
I copied straight out of the BOL.
I tried, it is working.
About the semi-colon, we need it before the WITH, if there is an other sql statement then the...
March 3, 2005 at 6:09 am
Hi all,
In the BOL for SQL Server 2005 Beta 2 (Yukon) the given example is
USE AdventureWorks
GO
WITH OrderedOrders AS
(SELECT SalesOrderID, OrderDate,
ROW_NUMBER() OVER (order by OrderDate)as RowNumber
FROM Sales.SalesOrderHeader )
SELECT *
FROM...
March 3, 2005 at 5:25 am
Thanks Srinivas,
Very good description of recursive common table expressions and great sample for getting hierarchical data with a defined value of drill down levels (sample 1).
I liked the sample 1....
March 3, 2005 at 1:34 am
Temporary tables are kept until you drop them or the session is closed. And you can use them repeatedly within the session.
But CTE is only used by the Select, Insert,...
March 2, 2005 at 9:25 am
You can use variables in CTEs.
Below there is a sample you can widely meet in Yukon T-SQL enhancements in SQL Server 2005 books.
Note that you should use ";" after any sql...
March 2, 2005 at 8:32 am
Viewing 15 posts - 151 through 165 (of 168 total)