Viewing 15 posts - 3,661 through 3,675 (of 13,469 total)
piliki (4/14/2013)
waiting for best answers!!!!
the example i provided actually works; so you will have to provide the specific details of whatever you did.
a user does nto have any more rights...
April 14, 2013 at 3:06 pm
SET @body = 'New record '+'''' + @ConfigSetID_Ins + ',' + @Name + ',' --+ @Timestamp
+ ''''+' has been added to '+'CongifSet table in xxxxx'
you must use CAST...
April 12, 2013 at 3:06 pm
you'll have to make a user for each Windows group or specific login, the rest is the same you would do in any other database: create a role with only...
April 12, 2013 at 2:36 pm
good god that is like the 200th post where we proposed the same solution with only minor differences between our code example!
you usually beat me to the punch anyway!
April 12, 2013 at 1:58 pm
inside the trigger, you can capture the first 4000 chars of the command text:
inside a trigger, you can do this, (DBCC INPUTUFFER can be used by users agasint their own...
April 12, 2013 at 1:56 pm
love to figure this one out!
nice!
i split the data with DelimitedSply8K, then grouped it, and then used FORXML to reassemble a new string:
/*
AcctNumFuelTypes
0000000500444Biodiesel,Gas
00000026104Diesel,Gas,Other - Non Fuel
*/
With MyGroupedData
AS
(
--split it up and...
April 12, 2013 at 1:51 pm
yeah, but there's another version that supports varchar(max), which is the datatype for sys.sql_modules.definition;
it's effectively the exact same code but varchar(max) instead of varchar(8000)
good for massive strings you need to...
April 12, 2013 at 1:38 pm
check the same database in SSMS: is it set as offline? a lot of processes don't see offline databases, i know i've tripped over that a few times.
April 12, 2013 at 1:35 pm
another way is to use dbo.Delimitedsplit on sys.sql_modules.defintion, so every word in the code is separate, then simply join it to the name in sys.procedures.
April 12, 2013 at 1:22 pm
Sean Lange (4/12/2013)
April 12, 2013 at 12:33 pm
your issue is this part:
SELECT @CAPTUREDSTRING = [DeletedItems]
FROM (
SELECT TOP 1 GETDATE()As TheDate,stuff(( SELECT ',' + Name
FROM INSERTED s2
--WHERE s2.WHATEVERID= s1.WHATEVERID --- must match GROUP BY below
WHERE 1 = 1
ORDER...
April 12, 2013 at 12:28 pm
monilps (4/12/2013)
Sorry, I was not clear enough. I need to update table name.From TableA, TableB to aaa_TableA, aaa_TableB.
Thanks.
well you alreayd got the advice that this is a bad idea, but...
April 12, 2013 at 7:36 am
i installed both tools mentioned in this post the http://poorsql.com and http://www.dpriver.com, and between them both probably use them two dozen times a day.
there are subtle style differences...
April 12, 2013 at 6:26 am
gurjer48 (4/12/2013)
i have 2 questions??1.can we use insert,delete inside user defined function(i tried myself it showing error 'side-effecting operator 'DELETE' within a function.')?
if not why?
No you can't with the...
April 12, 2013 at 6:17 am
now that i had a sip of coffee, it's even easier:
create the new table on the fly:
--script out the constraints and indexes from the original table
--create the new table instantly...
April 12, 2013 at 6:09 am
Viewing 15 posts - 3,661 through 3,675 (of 13,469 total)