Viewing 15 posts - 6,991 through 7,005 (of 14,953 total)
When you're importing from text files, or Excel/CSV/etc., one of the little-known (aparently) factors is that SQL uses the top four rows to determine the data type. If it...
February 25, 2010 at 2:41 pm
Would it work to have them type in a delimited list? If so, the query for that is easy.
February 25, 2010 at 1:53 pm
Is your login a local administrator?
February 25, 2010 at 7:27 am
I'd have to see both versions of the query to really comment on this. Exists is pretty high performance when used correctly, but so is cross apply.
If you really...
February 25, 2010 at 7:26 am
UTC would be better, in my opinion, than local time.
First, it makes calculating duration easier to calculate, because you can ignore "Spring ahead"/"Fall back" issues.
Second, it's easy to make the...
February 25, 2010 at 7:05 am
Good analogy.
I use all three, depending on the circumstances.
There have been times where I judged the error just needed to be fixed and nothing really needed to be said, so...
February 25, 2010 at 6:38 am
milzs (2/23/2010)
NULLIF(MIN(ISNULL(MyDateField, '1/1/1900')), '1/1/1900')
I was getting "int" conversion errors using values other than '1/1/1900'. I...
February 25, 2010 at 6:24 am
Elliott W (2/23/2010)
GilaMonster (2/23/2010)
Are we geeks or not?Yes, nerds NO!
I have a shirt that proclaims "GEEK" accross the front, just so there is no question..
CEWII
By derivation, a "geek" is someone...
February 23, 2010 at 3:00 pm
Add "AND @DTStart IS NULL" before the "OR" and see if that does what you need.
February 23, 2010 at 2:07 pm
Makes sense.
You posted while I was writing my answer, so I missed your post completely.
As a second thought, it might be easier to select top 1 and order by the...
February 23, 2010 at 2:05 pm
Most likely, there's empty space available in the database files and/or log files.
Right-click the database in Management Studio, go to Properties, and look for the Size and Space Available data.
February 23, 2010 at 1:57 pm
I would need table definitions, insert statements with sample data, and expected results, before I'd be able to venture a solution on this.
For one thing, I'm not clear on your...
February 23, 2010 at 1:53 pm
tony rogerson (2/18/2010)
I don't honestly know what your problem is here Paul - even Jeff...
February 23, 2010 at 1:12 pm
Nest NullIf and IsNull.
If your datetime column is called MyDate and it's in table MyTable:
select IsNull(MyDate, 0)
from dbo.MyTable;
That will replace the nulls with 0s (datetime 0 = 1 Jan 1900).
Then:
select...
February 23, 2010 at 1:00 pm
Viewing 15 posts - 6,991 through 7,005 (of 14,953 total)