Viewing 15 posts - 241 through 255 (of 568 total)
Hi,
Your queries to locate the duplicate records in the table,
Ref: http://support.microsoft.com/kb/139444
And the articles by the chris cubley
http://www.sqlservercentral.com/articles/Miscellaneous/findinganddeletingduplicatedata/1075/
September 20, 2009 at 9:10 pm
More safe is making a return statement with desired messages in the SP,then only the users/sa/dba understand the causes.
ALTER PROCEDURE DBO.MYPROCEDURE
--
--
--
as
begin
begin
raiserror ('your message why its blocked to execute, any specific...
September 19, 2009 at 12:18 am
[quote-0Is there a way to find out which program did that using Trigger?[/quote-0]
Add the columns of the following in the main table to avoid the trigger for this particular case,
1)user...
September 19, 2009 at 12:01 am
The PURGEWINAUDIT is enough to maintain the x days records,
And to find out the duplicate rows, use this
SELECT ItemValue1, DateTimeDB, AuditID
FROM dbo.WinAudi2
WHERE (ItemName = 'Computer Name')
group by ItemValue1, DateTimeDB, AuditID
having...
September 18, 2009 at 11:51 pm
bdudley (9/18/2009)
I also have a stored procedure that can delete all records older than x amount of days, but this a little more advanced than I usually mess with
Hi,
Post your...
September 18, 2009 at 11:18 pm
Apply this option with reference of the BOL.
September 18, 2009 at 9:05 pm
SET ROWCOUNT 10
SELECT * FROM MYTABLE
September 17, 2009 at 9:45 pm
Hi,
There is no document and undocument procedures available to direct get this result,
you should work lot of scquecne to arrive this result,
Do first with to identify of the result procedure...
September 16, 2009 at 9:38 pm
Hi,
Second time this query posted,
Dastagiri, mention your problem in
http://www.sqlservercentral.com/Forums/Topic787173-338-1.aspx
So that, will understand your issue better.
September 14, 2009 at 10:01 pm
Hi,
try this
Declare @RESULT datetime
set @RESULT = getdate()
--
select (cast(day(@RESULT) as varchar)+
(case when (right(day(@RESULT),1) >= 4)
or(right(day(@RESULT),1)= 0)
or((left(day(@RESULT),1) = 1)and len(day(@RESULT))= 2) then 'th'
when right(day(@RESULT),1) = 1 then 'st'
when right(day(@RESULT),1) =...
September 14, 2009 at 2:18 am
Hi,
Repeated post, discussion already started,
http://www.sqlservercentral.com/Forums/Topic787173-338-1.aspx
September 14, 2009 at 12:07 am
create table #product
(
Title varchar(2),
priid int,
status int
)
insert into #product
select 'A',1,1
union all
select 'A',2,1
union all
select 'A',3,1
union all
select 'A',1,2
union all
select 'A',2,2
union all
select 'A',3,2
union all
select 'A',1,3
union all
select 'A',2,3
union all
select 'A',3,3
union all
select 'A',1,4
union all
select 'A',2,4
union all
select...
September 13, 2009 at 11:45 pm
September 11, 2009 at 9:45 pm
hi,
Try this
select min(id),sum(productsales),
min(CAST(STR(MONTH(saledate))+'/'+STR(01)+'/'+STR(YEAR(saledate)) AS DateTime))
from MYTABLE
group by month(saledate),Year(saledate)
September 10, 2009 at 12:24 am
Viewing 15 posts - 241 through 255 (of 568 total)