Viewing 15 posts - 1,231 through 1,245 (of 1,554 total)
Could you explain a little more on why you want this packaged into a stored procedure? I don't quite see the point of it, if practically everything else is already...
January 11, 2005 at 6:53 am
You can also place the CASE in the ON clause directly:
select *
from #t1 t1
join #t2 t2
on t1.col1 = case t2.col2
when 187
then 95
when 197
then 93
else 1
...
January 11, 2005 at 6:48 am
Well, ADO is just fine if you want to do it from a 'client-side'. If you wanted to do from within Transact SQL, then I'd probably use xp_cmdshell...
Personally, I'd...
January 11, 2005 at 4:28 am
Here's a quick demo showing the 'flawed' logic.
create table #t (id int not null, batch char(1) null, arch datetime null )
insert #t select 1, null, null
insert...
January 11, 2005 at 4:23 am
Hmmm.. well.. if you take a closer look at this formulation: (batch is not null or batch != '')
What you ask for here is the count of all rows...
January 11, 2005 at 4:01 am
What is the count if you ask like this?
select count(*) from Table_T where datearchived is null and ISNULL(batch, ' ') < > ' '
(remember there is a difference between ' ' and '' - space...
January 11, 2005 at 3:05 am
Nah, I didn't tell you to not jump in, just not to answer the 'hand up' quiz to your own post. *grins*
/Kenneth
January 10, 2005 at 8:56 am
That's true - didn't think of that (tnx Frank )
To expand on the 'trick' I described (and where quotename() won't help) - another...
January 10, 2005 at 8:51 am
Why not just run the wmi script through xp_cmdshell, have it output to disk, and then stuff that output into a table..? (probably needs some clever parsing, but you don't...
January 10, 2005 at 8:43 am
Hi there.
Well, I can't begin to try understanding what is going on, or the purpose of it all, however it seems like there's a lot of calculations, searched cases and...
January 10, 2005 at 8:40 am
The problem that may arise when nesting in doublequotes and escaping quotes and whatnot, is that the code quickly becomes very hard to read (and therefore also to debug)
A 'trick' you...
January 10, 2005 at 8:21 am
Then I might as well explain a litle further why I asked the question the way I did
As I said earlier in the thread, I...
January 10, 2005 at 3:32 am
Thing is EM doesn't always 'get the job done' due to what EM does. In cases like Frank mentions, imo that's failng the job, if EM takes unnecessary time and...
January 5, 2005 at 4:04 am
Of course I don't know your data as you do, but.... I must stress my point here.
I just want to make sure that you do realize that by doing...
January 5, 2005 at 3:47 am
If you read closer, you'll notice that the conversion is on the parameter side, not the column itself - so indices will likely get used. It's the other way around...
January 5, 2005 at 2:30 am
Viewing 15 posts - 1,231 through 1,245 (of 1,554 total)