Viewing 15 posts - 13,756 through 13,770 (of 13,874 total)
Use the isnull() function. Try this example:
declare @var1 integer, @var2 integer
set @var1 = null
set @var2 = 25
select isnull(@var1,0) as var1, isnull(@var2,0) as var2
Cheers
Phil
September 1, 2004 at 10:12 pm
Here's another stupid way:
SELECT DATENAME(month, @month * 28)
-- where @month contains an integer between 1 and 12.
Can't see any more obvious way. It would perhaps be more elegant to...
September 1, 2004 at 10:07 pm
Hi Russell - so what, exactly, are you looking for?
1) Are you looking for a way of randomly selecting a sample % of records from an overall population?
2)...
August 31, 2004 at 10:06 pm
Wow! How accurate do you need to be? ![]()
The Money datatype in SQL Server helpfully rounds to 4dp, so that's possibly where things...
August 27, 2004 at 1:26 am
Hmmm ... if you follow the Dictionary.com definition a little bit further down the page, you get to this:
Main Entry: effect
Function: transitive verb
1 : to cause to come into being
2...
August 26, 2004 at 6:26 pm
Hi Frank, check out this thread for more info on this.
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=127527
Regards
Phil
August 26, 2004 at 2:11 am
Have you checked that the system date and time on the server are correct?
August 25, 2004 at 10:26 pm
Fantastic, a conversation about grammar
Sorry fhanlon, but going back to the Dictionary.com reference, if you follow the link for "Usage Note"...
August 23, 2004 at 6:03 pm
I think in the question it should be 'effect', rather than 'affect' (otherwise, which UPDATE statement is affected?) - and, being a grammar nazi, I therefore got this question 'wrong'...
August 23, 2004 at 12:26 am
I'm afraid I am now in the same boat as Jeff. I do not understand what you are trying to achieve. Can you explain the problem without trying...
August 23, 2004 at 12:17 am
Ilan, it looks like you're trying to do some update processing that depends on the results of several select queries (but as Jeff said, it's not 100% clear from your...
August 22, 2004 at 10:27 pm
Not quite sure I understand what you're trying to do. You say that this is an INSERT trigger - ie a trigger which is run when a new record...
August 19, 2004 at 7:56 pm
Anne's nearly got it.
Try this:
select replace(convert(varchar(12),getdate(),114),':','')
Regards
Phil
August 18, 2004 at 9:24 pm
Presumably you have a reason for using fixed-width files rather than [tab] or [comma] delimited? A mainframe background, perhaps ![]()
When you open the fixed-width...
August 18, 2004 at 7:55 pm
Viewing 15 posts - 13,756 through 13,770 (of 13,874 total)