Viewing 15 posts - 5,116 through 5,130 (of 5,394 total)
vyelchri (6/23/2009)
i have created the table and trigger in my database and i did some modifications in one stored procedure. when i clicked on execute...
June 23, 2009 at 1:19 am
hi_abhay78 (6/23/2009)
select name,modify_date from sys.objects where type ='P'
Ok, this works but does not return the number of times the procedure is modified. Anyway is a nice way to return last...
June 23, 2009 at 1:18 am
You can use database triggers to accomplish this task.
I use this simple one:
1) Code for destination table:
CREATE TABLE [dbo].[ChangeLog](
[LogId] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
[DatabaseName] [varchar](256) NOT NULL,
[EventType] [varchar](50) NOT...
June 23, 2009 at 12:58 am
This could sound like a silly reply, but, what about optimizing the query so that it runs faster on the linked server?
Are you running the query with OPENQUERY / EXECUTE...
June 23, 2009 at 12:53 am
June 12, 2009 at 3:21 am
Try using a temp table instead. Table variables exist only in the scope they're defined in.
Take a look at this article[/url]: it's an excellent resource for a complete understanding of...
June 12, 2009 at 3:17 am
I look forward hearing from you.
Good luck!
June 12, 2009 at 3:10 am
You might also be interested in taking a look at this article on dynamic search conditions.
I think it is one of the best resources on the topic.
Regards
Gianluca
June 12, 2009 at 3:06 am
Try with this:
SELECT *
FROM table
WHERE Id = COALESCE(@id,Id,-1)
I chose -1 as a non existent value for Id to exclude NULL values for Id column, but this depends on the data...
June 12, 2009 at 3:03 am
Well done, Gail!
I think this is going to be part of many people's signature like Jeff's article on posting best practices.
June 12, 2009 at 2:29 am
RBarryYoung (6/12/2009)
Does anyone know of any client-code DB tools that change their queries into sp_executesql calls? Does Linq-to-SQL or Linq-to-Entities do that?
Some Java jdbc drivers turn prepared statements into...
June 12, 2009 at 1:00 am
GilaMonster (6/11/2009)
... the keyword 'column' doesn't need to be there.
That's right Gail, I'll edit my previous post.
Mjarsaniya, you can use the dynamic sql when the columnname is determined at...
June 11, 2009 at 8:55 am
The problem is with the variable, you can't use it that way. You should define the whole alter statement in a string variable and the execute it:
DECLARE @sql nvarchar(4000)
SET @sql...
June 11, 2009 at 8:48 am
You could do it splitting the parameters into a table with a script like this:
http://www.sqlservercentral.com/scripts/T-SQL+Aids/31871/
There are lots around, even more efficient, with tally tables or with loops, just pick one.
create...
June 11, 2009 at 8:37 am
Viewing 15 posts - 5,116 through 5,130 (of 5,394 total)