Viewing 15 posts - 58,846 through 58,860 (of 59,039 total)
Put the customer error message in the App?
January 6, 2005 at 6:13 am
Guess I'll add my two (or is it 3?) cents...
------ Finds the LAST day of CURRENT month with no time element SELECT DATEADD(mm,DATEDIFF(mm,0,GetDate())+1,0)-1 AS LastDayCurrentMonth
------ Finds the LAST day of CURRENT month...
January 5, 2005 at 9:23 pm
All of that seems like a fair amout of work to keep a table with only 1 row... why not just log in as the "sa" and revoke insert, update, and...
January 5, 2005 at 8:43 pm
Ok, Ken, here ya go...
DATEADD(d,DATEDIFF(d,1,getdate()),0)
DATEDIFF(d,1,getdate()) takes the difference between the current date and 01/02/1900 and converts it to a whole number of...
January 5, 2005 at 5:19 am
I'll second that... Frank's method also allows for indexes to be used on the date columns where a conversion sometimes does not.
January 4, 2005 at 9:37 pm
Brian wrote: > Feel pretty stupid answering my own question, but I think this does the trick if anyone else is interested. DepDate >= '8/1/04' AND ArrDate =< '8/10/04'
I wouldn't...
January 4, 2005 at 9:09 pm
If your going to update the table every day, then I'd use non-clustered indexes only.
Another thing to try is to rebuild your data in a staging table that looks exactly...
January 4, 2005 at 8:50 pm
Frank wrote: >Could it be you're mixing some kind of presentational stuff in here, Jeff?
Only for demonstration purposes... the pipes were so you could see the spaces.
I'm one of...
January 4, 2005 at 8:20 pm
Getting the usage is the hardpart... the names used below are the "logical" names for each file...
SELECT FILEPROPERTY('northwind', 'spaceused')*1024*8 SELECT FILEPROPERTY('northwind_log', 'spaceused')*1024*8
To get the allocated file size for each file, use...
January 3, 2005 at 9:39 pm
Not a challenge here... I'd really like to know...
Using the following code example, I get what most people would consider to be an "undesirable result"...
CREATE TABLE #MyTest (TestChar CHAR(10)) INSERT...
January 3, 2005 at 2:52 pm
Very nice, indeed! It's this type of attention to the forums that makes SQLServerCentral so great.
We all have to remember that a person asking a question has already swallowed...
January 3, 2005 at 2:44 pm
It sounds to me that SMALLINT would be the most appropriate here but, if you use INT instead, you will not notice a huge performance change. The big drawback of...
January 2, 2005 at 6:05 am
Since you're interested in the DBA side, in the Henderson book, he recommends just letting SQL grow on it's own using only the default settings... very, very bad idea. The...
December 31, 2004 at 10:40 pm
I agree with Steve... trap for errors if you are goin to build your own T-SQL to do this. If you use Enterprise Manager to make the table design change,...
December 31, 2004 at 10:21 pm
You'd be better off to run the SQL from the view in Query Analyzer once with the Index Wizard to create indexes on the underlying tables of the view.
December 30, 2004 at 11:13 pm
Viewing 15 posts - 58,846 through 58,860 (of 59,039 total)