Viewing 15 posts - 1,396 through 1,410 (of 1,554 total)
Another method to effectively cover all times within a given day is
select * from table
where date_received >= '2004-08-20' and date_received < '2004-08-21'
(assuming that you want all records from the day...
August 26, 2004 at 4:29 am
I noted that the main subject of that thread was "to avoid using a cursor".
Just be aware that while "UDF" doesn't spell like "cursor", the implementation of many UDFs shows...
August 26, 2004 at 3:44 am
I'm not going to ask the purpose of all those statuses, but I wonder if not the real problem lies in the design of the different statuses themselves.. (I'm trying...
August 26, 2004 at 3:36 am
Not knowing the full extent of your scripts, but this one-liner will show you the name of each database and execute sp_helpuser within the context of each db on the...
August 26, 2004 at 3:22 am
Why mess around with rounding when rounding is to be avoided?
Just cast the decimal to a string and chop it from left side to 2nd position after the decimal...
August 25, 2004 at 5:51 am
Ah, my bad.
Didn't read the question close enough...
In that case,
selectCASE field2 WHEN 0 THEN 0
ELSE (field1 / field2) END
+ ( other calcs...
June 28, 2004 at 3:41 am
Uniqueidentifier would however use 16 bytes, when an int only uses 4, and the format is less than 'user-friendly'.
Personally, I'm not too fond of using uniqueidentifier as PK if it...
June 28, 2004 at 1:18 am
Hmm... how do you mean?
If field1 is 2 and field2 is 0, you have 2/0 which is illegal.
What you want then is 2/1 which is 2.
Agreed, this is logically the...
June 24, 2004 at 3:03 am
What happens if two connections use this function at the same time..? They would both get the same number, it seems.
Usually that isn't too good.
When you get to the...
June 24, 2004 at 12:14 am
It's pretty calm over at sswug as well...
The sun must be shining somewhere
/Kenneth
June 23, 2004 at 5:08 am
So, if field2 is 0, you want to replace this with a 1 to avoid the division by zero error.
Try this:
field1 / ISNULL(NULLIF(field2, 0), 1)
The idea is that if field2...
June 23, 2004 at 1:51 am
Isn't that nice?
I provide you loads of opportunities to post something.
/Kenneth
June 23, 2004 at 1:42 am
Actually, using identity column and @@identity opens up for some caveats. IF any triggers should be involved in the scope of the transaction on other tables with ident columns, @@identity...
June 23, 2004 at 1:26 am
Well, the key to avoiding disk latency is to avoid all usage of tempdb and ensure that all datapages are already in cache
Utopia...
June 22, 2004 at 6:45 am
Viewing 15 posts - 1,396 through 1,410 (of 1,554 total)