Viewing 15 posts - 46 through 60 (of 89 total)
Does any 30 minute period reset the loginattempts back to zero? I would not use a trigger for this. Putting it in a trigger would cause the trigger to be...
June 14, 2006 at 12:47 pm
Did you look at the execution plans for both the queries individually and the full query using the UNION statement? Can you post your table structure along with indexes...
June 8, 2006 at 7:24 am
This should work. You may want to join to sysobjects to limit the scope to just user tables??
select distinct object_name(id), si.groupid, sf.groupname
from sysindexes si, sysfilegroups sf
where si.groupid=sf.groupid
Recommend only using this...
May 30, 2006 at 2:43 pm
You can create the temp table in the first procedure with the columns that are always in the table, or at least with a column that will just serve as...
January 9, 2006 at 8:32 am
Try
DECLARE @List varchar(100)
SET @List = '''ONA'', ''TSV'', ''KVS'''
Also, you will need to execute the entire statement as dynamic SQL.
SELECT @List='SELECT * FROM Table WHERE Column IN ('+@List+')'
SP_EXECUTESQL (@List)
Brian
May 31, 2005 at 3:52 pm
What happens if you change the NOT IN to a LEFT OUTER JOIN in the first query and the IN to a INNER JOIN in the second query? Hopefully my...
May 13, 2005 at 12:45 pm
Why not check the rowcount after initiating the update statement. If nothing is updated, then issue an insert statement.
UPDATE ...
IF @@ROWCOUNT=0 -- No records updated, so it doesn't exist and...
January 21, 2005 at 1:18 pm
Frank,
Why do you believe creating a function is among the worst possible solutions? I guess I like to create functions for commonly used conversions. Not only do I help assure...
January 18, 2005 at 7:11 am
Or, you could add a trigger to the history table that will maintain a table for the last five inserted records for each id.
create table test (ID int, canned varchar(10), realtime...
September 14, 2004 at 1:42 pm
If each ID has a consecutive dates in the realtime column, you could do something like:
select id from (select id, realtime from history where realtime>dateadd(day,-5,getdate()) and canned='fOff') a group by...
September 14, 2004 at 1:24 pm
If you are going to store a comma seperated list and then want to search for distinct values in the list, you will need to include a leading comma with...
September 13, 2004 at 4:17 pm
You can use SCOPE_IDENTITY() instead of @@Identity or IDENT_CURRENT. It will return the identity value you just inserted and ignore the result of the trigger.
Brian
September 13, 2004 at 4:09 pm
Will this work? I added a #log table to the procedure and insert the values into the #log table instead of doing an "if exists". Then select from the #log...
August 24, 2004 at 12:59 pm
If the value is based on running a function against the identity field, you should be able to use a caclulated field.
CREATE FUNCTION [Add2] (@id INT)
RETURNS INT AS
BEGIN ...
August 20, 2004 at 9:43 am
This should give you a list of the document numbers.
select distinct a.*
from (select f.docnum from F0413 f, F0911 ff where f.docnum=ff.docnum and ff.doctype='pk') a
left outer join
(select f.docnum from...
May 7, 2004 at 1:46 pm
Viewing 15 posts - 46 through 60 (of 89 total)