Viewing 15 posts - 57,031 through 57,045 (of 59,066 total)
Don't need it... N is the clustered Primary Key. Yeah, I know what you're going to say...
Anyway, the length in the substrings is hardcoded... surely you're not suggesting that I...
January 20, 2007 at 6:32 pm
If you have a Tally table, here's a possible solution, as well...
CREATE FUNCTION dbo.StripNonDigit(@Input VARCHAR(8000))
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @Result VARCHAR(8000)
SELECT @Result = ISNULL(@Result,'')
...
January 20, 2007 at 11:39 am
Yep... I agree with Serquiy... if it's for an automatic dialer (or ever could be) or for humans to actually know whether it might be an international call just by...
January 20, 2007 at 11:14 am
True enough
, Serqiy, but if you want to name variables for flexibility, it is an error to name them after the actual...
January 20, 2007 at 11:11 am
I'm with PW... I normally use "Derived Tables", as well. And, I normally don't like correlated subqueries because they can be difficult to troubleshoot. But their use seems appropriate just...
January 20, 2007 at 10:52 am
Got a code example for this particular "keep last 50" problem so we can see what you're talking about? I think you're talking about pre-assigning constants as variables which also...
January 20, 2007 at 8:54 am
Nicely done... although I do hope no one actually tries to pass a billion characters worth of parameters ![]()
By the way... you hardcoded the 2's...
January 20, 2007 at 1:12 am
Some of the solutions on the link seem, well... a bit bulky... I don't remember where I got it from but this works and it's nasty fast...
USE NorthWind
GO
CREATE...
January 20, 2007 at 12:30 am
No "error"... Think of it as an "interation step" "that I hope will never be changed in my lifetime"... ![]()
...unless you'd rather see...
WHERE RowNum <=...
January 20, 2007 at 12:06 am
This is SO much easier if you have a RowNum column....
SET NOCOUNT ON
DECLARE @MyTable TABLE
(
RowNum INT IDENTITY(1,1) PRIMARY KEY,
ItemName VARCHAR(6),
ItemNo INT,
ItemValue NUMERIC(20, 2)
)
January 19, 2007 at 11:52 pm
Shoot.... in this day an age of supposed equal opportunity, why would you need to know? Might even be against the law if it's for college admissions, for example...
January 19, 2007 at 11:24 pm
The column names in the #Drives table must be the same as those returned by the xp. You have FreeMB as one of the column names... you need to either...
January 19, 2007 at 11:01 pm
You might be able to do the count thing with a RowNum IDENTITY column... have the trigger delete...
WHERE RowNum < IDENT_CURRENT('table_name')-49
January 19, 2007 at 10:50 pm
Stef,
These types of problems are incredibly simple if you have the right kind of tools. Fortunately, there is one tool that has tremendous utility as just such a tool. It...
January 19, 2007 at 10:10 pm
I screwed up... that's what I get for late night programming... I don't know what on Earth made me think that @@ROWCOUNT would ever be a NULL. If you want...
January 18, 2007 at 6:15 am
Viewing 15 posts - 57,031 through 57,045 (of 59,066 total)