Viewing 15 posts - 61 through 75 (of 335 total)
COUNT(*) and SUM( CASE WHEN datefield BETWEEN whenever AND whenever THEN 1 ELSE 0 END )
December 21, 2005 at 4:33 pm
You ought to post your actual syntax when asking a question like this.
From what little you've provided, I'm going to guess it has to do with quoted identifier being...
December 21, 2005 at 1:51 pm
OK you ought to use the MODULO operator instead of the more complex math:
select * from sysobjects where id % 10 = 0
But the caveat is: IF you have...
December 19, 2005 at 1:45 pm
from table a left outer join table b on a.key = b.key -1 where b.key is null
gets you last row BEFORE a break
reverse to get last row AFTER a...
December 15, 2005 at 2:36 pm
Use @@ERROR AND @@ROWCOUNT to evaluate:
--sample failure:
exec ('insert into sysobjects select ''abc''' )
select @@error, @@rowcount
--sample success:
exec ('declare @a int select @a=1 ' )
select @@error,...
December 13, 2005 at 4:52 pm
Assuming you mean "Given SQL Server"...
I suppose if you completely encapsulated all access via DLLs or other client applications it might be possible. (By way of shipping a finished db...
December 13, 2005 at 2:48 pm
Have the stored procs put the data into a temp table like I said. It doesn't matter how many steps it takes. Then after you're done, the last thing...
December 7, 2005 at 9:37 am
Cringely had a good piece on this about the new robberbarons:
http://www.pbs.org/cringely/pulpit/pulpit20050804.html
In a nutshell: This and related legislation will be used to drive the smaller more competitive institutions out of...
December 6, 2005 at 2:08 pm
If it's ok with you to have your proc access xp_cmdshell, then do the simple thing:
BCP queryout with the -c option makes it tab/CRLF delimited
(and you may need to stage...
December 6, 2005 at 1:49 pm
why not join to an embedded query which gets max date for each month?
select key, yr, mo, value
from tablex x
JOIN (
select key, datepart( yy, datefield ) AS yr,...
November 29, 2005 at 5:35 pm
Throughout the history of man, he has searched for the holy grail of objective assessment of others. The only certainty that I have found is that, the more criteria/hoops/steps you...
November 21, 2005 at 3:29 pm
So why not start by defining your own set of meta-standards? You don't have to know anything about SQL Server to do that, you just have to figure out why...
November 18, 2005 at 3:12 pm
That depends, what's your favorite color?
Seriously, how do you define "value"? Are you asking what pays more? Chances are if your asking that you don't really care, you just want...
November 18, 2005 at 3:01 pm
OK, well, for me, I'm partial to calling SQL Server, "SQL Server". Sometimes during conversations, I'll simply say "Server" or "The Server". Then, when lapsing into laziness, I might generically...
November 18, 2005 at 2:52 pm
Viewing 15 posts - 61 through 75 (of 335 total)