Viewing 15 posts - 8,251 through 8,265 (of 13,460 total)
just tested this, and it works fine, assuming you have dbmail setup with a profile;
--DROP TRIGGER [TR_Logon_Trigger_Track_sa] ON ALL SERVER
GO
CREATE TRIGGER TR_Logon_Trigger_Track_sa
ON ALL SERVER FOR LOGON
AS
BEGIN
--the auditing...
January 3, 2011 at 1:21 pm
i would update it to an arbitrary number so that SQL's locking mechanism locks the row, then complete the work:
BEGIN TRANSACTION
DECLARE @iCnt As BigInt
SELECT @iCnt = Counter
FROM CR_CONTROL
--arbitrary update to...
January 3, 2011 at 9:45 am
you could tackle it it two ways.
since you KNOW you are going to update the table to teh next counter value (unless the transaction rolls back) update the table to...
January 3, 2011 at 8:39 am
GilaMonster (1/3/2011)
I'm exceedingly curious why he wants to remove them all. No good reason usually for that and unless i missed it no reason given in initial post.
re-reading the post,...
January 3, 2011 at 7:42 am
putting in all those descriptions was incredibly time intensive for someone to do...and you want to delete them because they bother you, not because of a business reason.
You should check...
January 3, 2011 at 6:39 am
instead of quotes, you could use the builtin QUOTENAME function to get brackets, which would still be syntactically correct:
SELECT 'EXEC sp_helpdb ' + QUOTENAME(name) + ' FROM sys.tables
January 1, 2011 at 11:58 am
well, adding two optional parameters to your proc, i'd suggest something like this:
ALTER PROCEDURE [dbo].[sp_listcategoryproducts]
@dolar float,
@katid int,
@sayfano int,
--used to set group size of paging
@BatchSize int = 10,
--used to decide which...
December 29, 2010 at 12:28 pm
i was looking for real code specifics..CREATE TABLE Category....
and then how you wanted to filter the products:
SELECT * FROM PRODUCTS WHERE CATEGORYID = ....
those details are what i'd need to...
December 29, 2010 at 11:08 am
here's an example using row_number of using that to page information;
if you gave us more details, specifically the actual table schemas, and maybe a sample select statement, we could offer...
December 29, 2010 at 10:09 am
this seems to give me the results i was looking for, it's rather dawn out into CTE's to show all the logic and can be easily shortened up, but i'm...
December 23, 2010 at 1:43 pm
this seems to wrok for me; if i put it on a table that has FK's pointing to it, the constraints for the FK are enforced before the trigger fires.
CREATE...
December 23, 2010 at 7:10 am
since you said you are building a string, this is probably what you want for a demo:
CREATE TABLE IDDemo
( pk_ID Integer IDENTITY(1,1)
, Textdata Varchar(100) )
DECLARE @sql varchar(max)
declare @tablename varchar(30)
SET @sql...
December 22, 2010 at 5:01 pm
Don i think your EXC command needs to do everything all together; you can separate commands with a semi colon, which is rumored to be mandatory in a future version...
December 22, 2010 at 4:33 pm
JStevenson1 (12/22/2010)
I have several value in a column called test.Select Statement: Select Test From Abc
Output: JonDoe
Desired Output: 'JonDoe'
How do I achieve desired output?
so the only difference is you want...
December 22, 2010 at 2:22 pm
based on Sean's post, i think if you join the grouping back to the original table, you can at least see the dupes :
SELECT #mx.bid_price_old, #mx.* FROM #mx
LEFT OUTER JOIN...
December 22, 2010 at 2:15 pm
Viewing 15 posts - 8,251 through 8,265 (of 13,460 total)