Viewing 15 posts - 50,941 through 50,955 (of 59,091 total)
For a single result set that you can join to...
--===== Declare your parameters
DECLARE @pYear INT, @pMonth INT
--===== Set the parameters (simulates a proc or udf parameters)
SELECT @pYear = 2008,
...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 29, 2008 at 2:24 am
To get all of the dates in the range all at once, then the following will do it for you...
--===== Here are the two parameters you wanted
DECLARE @DateStart DATETIME
DECLARE @DateEnd...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 29, 2008 at 2:15 am
Well... lemme shift gears here, a bit. You say you want a "text representation" of the matrix of 100,000 columns and 10,000 rows... that's 1,000,000,000 or a Billion "cells"...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 29, 2008 at 1:35 am
Understood... I was agreeing with you...:)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2008 at 5:13 pm
Lemme ask again... what's in the TEXT column?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2008 at 5:09 pm
virgo (4/28/2008)
:w00t: ok Jeff....just in some cases i need to do that way....am using sql server 2005....thanks much for ur reply
Ian's method using ROW_NUMBER() OVER will work just fine, then.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2008 at 5:06 pm
Zactly...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2008 at 7:15 am
Heh... thanks Grant... I'm just a wee bit embarrased that I didn't pick up on that before I posted the question. 😛 More COFFEE!:hehe:
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2008 at 7:02 am
So use Robert's function as part of a derived table, join it, and pivot it.
It really would help if the OP would post exactly what output is expected from the...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2008 at 6:33 am
Never mind...
Master.sys.dm_Exec_SQL_Text is a system table-valued function... I thought it was a system view.
:blush:
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2008 at 6:14 am
Why bother? If you want to update a table with an IDENTITY column, then just do it.
If you're trying to create a query that returns a numbered list, then...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 27, 2008 at 9:01 am
Some have tried to come up with a formula... I've not been very successful at it because it really isn't database size dependent. It's impacted more by what the...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 26, 2008 at 11:30 pm
You bet... let us know how you make out on this problem.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 26, 2008 at 10:57 pm
As with so many types of testing, you must also test your "made up" questions as well. This question actually has two correct answers... made up or not... 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
April 26, 2008 at 12:09 pm
It orders by data_id assuming that you want to know the next one. Your example data was not in order by data_id, but I think you may have meant...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 26, 2008 at 11:45 am
Viewing 15 posts - 50,941 through 50,955 (of 59,091 total)