Viewing 15 posts - 301 through 315 (of 345 total)
repent_kog_is_near (4/1/2011)
the trigger, ideally, should be fired only when there is a new row...
April 1, 2011 at 9:20 am
repent_kog_is_near (3/31/2011)
example: trigger should fire only when AccountFK is not NULL in an insert int tblProject ; if AccountFK is populated, don't bother.
So it should only fire when it's not...
March 31, 2011 at 3:01 pm
declare @WSUrid numeric
Why is this ID field a numeric? You have decimal IDs?
set @WSPrice1 = 'Select ISNULL(' + @WSUrnam + ',0) from dbo.productstb where productid = '...
March 31, 2011 at 12:35 pm
tamir-859073 (3/29/2011)
How to display the database data
Easy, use the code listed in this post http://www.sqlservercentral.com/Forums/Topic1082905-1292-1.aspx
March 29, 2011 at 8:13 am
You mostly have what you need. Put a "Union All" between the selects.
March 25, 2011 at 7:48 am
beginner123 (3/23/2011)
March 24, 2011 at 12:36 pm
Why can't you get the account# you are trying to insert before you insert into table ml? It seems you have all available info needed at point of insert, but...
March 24, 2011 at 8:22 am
Whenever you start a trigger out by assigning variables, you've lost. Think about your statement
SELECT @stamp = mlstamp, @cct = RTRIM(cct), @dim1 = RTRIM(dim1), @dim2 = RTRIM(dim2),
@dim3 = RTRIM(dim3), @dim4...
March 23, 2011 at 3:06 pm
The GO statement marks the end of the batch and will end the procedure. Remove the GO from the middle of your create procedure script.
March 21, 2011 at 10:32 am
Yep, this is my new favorite. Thanks Drew.
If this improvement keeps up every post, pretty soon this will be a built-in SS function! Oh wait...:-)
March 17, 2011 at 1:09 pm
Yep, that may be a little shorter than my version 😉
select * from #test where ' '+col+' ' like '%[!",.'':;? ]rate[!",.'':;? ]%'
Thanks David.
March 17, 2011 at 11:48 am
Ok, now I see where my question was silly. It's not comparing '% rate %' to 'rate' because you added the spaces before and after and then did the wildcard...
March 17, 2011 at 10:14 am
David Burrows (3/17/2011)
WHERE CHARINDEX(' rate ', ' '+col+' ') > 0
or
WHERE ' '+col+' ' LIKE '% rate %'
Perfect, David. Works great, but why does it work? Does SS just ignore...
March 17, 2011 at 8:43 am
I must admit I am impressed with the cleverness of your solution...but I have another failed test clause. Insert the word 'substrate' to the #test and your query will select...
March 17, 2011 at 7:38 am
Thanks for the quick reply CC, but I don't want to search for the phrase 'rate is 5', I only want results that have the word 'rate'.
Let me add...
March 16, 2011 at 3:58 pm
Viewing 15 posts - 301 through 315 (of 345 total)