Viewing 15 posts - 1,756 through 1,770 (of 4,080 total)
Man, you're in fine form tonight Barry. The pain meds must be extra-fine. It almost makes me wish I'd kept my signature line listing you...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 8:48 pm
This one[/url] might be of interest too.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 7:44 pm
Another approach would be the use of a NOT EXISTS test in your WHERE clause, something like this
SELECT ...
FROM computer_lists
WHERE NOT EXISTS (select 1 from software where software.product_name =...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 7:20 pm
Having aced two courses in Intellectual Property at the Vanderbilt University School of Law, I feel entitled to have an opinion on Mr. Dunleavy's actions: He doesn't...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 6:28 pm
Seeing how you are passing parameters which are strings of comma-separated values. I can suggest this approach without trying to guess at the structure and content of your...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 5:38 pm
You don't have to reverse-engineer much to figure out that the code posted could never work.
DECLARE @DCMResourceID varchar(max)
Set @DCMResourceID ='2604, 2606,2607,2610'
WHILE (patindex('%,%', @DCMResourceID) > 0 )
begin
select (patindex('%,%', @DCMResourceID)) -- replaces...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 5:25 pm
I see what you mean, but my point wasn't the selection/omission criteria in the where clause. In fact, I learned something from the earlier posts and made a...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 4:53 pm
You may also want to file away this version, which uses an inline table valued function. It performs significantly faster if you have to clean up a...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 2:59 pm
Lutz is right, it's better to expressly test a value for equality. Not equals testing may cause you problems with NULLs.
In any event, the case expression evaluates to...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 1:58 pm
Your original was a little confused with respect to the source and the target table. I assume you wanted the target table to be the table updated,...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 1:40 pm
True, but then you create headaches for the poor, struggling UI developer who has to learn how to handle two different types of output from a single procedure. ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 6:44 am
Karthikeyan, I believe you are confusing the two different types of table-valued functions. The following quote is from BOL "Types of Functions". I've added emphasis in...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 23, 2010 at 6:35 am
You don't need the subqueries in your SET clause. You've already JOINED those values to get the maximums. Try as shown below. ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 22, 2010 at 5:27 pm
Jason, I just searched back through T-SQL QotDs looking for the string "Name" and couldn't find it. 🙁
I distinctly remember some of the odd things from it though....
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 22, 2010 at 3:53 pm
Yes! There was a really funny Question of the Day about names.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 22, 2010 at 2:42 pm
Viewing 15 posts - 1,756 through 1,770 (of 4,080 total)