Viewing 8 posts - 1 through 8 (of 8 total)
Hi,
You can specify the FromTime and EndTime in the extended stored procedure.
see the syntax below.
xp_readerrorlog 1,1,search1, search2, fromtime, endtime, asc/desc
Thanks,
February 15, 2011 at 3:26 am
Hi,
Here is the example to use CTE(Common Table Expression)
You can use CTE to get unique country codes.
-- Lets say this sample table holds your final data with duplicate codes
Declare...
January 24, 2011 at 3:45 am
Hi balagi,
Are you using stored procedure? or building insert script in other programmin language.
try this
1. declare variables.
2. set your values
3. insert
declare @Id int,@Name varchar(50),@type int,@Email varchar(100),@Versionnumber varchar(10)
--SET YOUR...
August 31, 2010 at 2:29 am
Hi, Change @t to your table name and your columns for id, amount, adate
WITH cte AS
(
SELECT ROW_NUMBER() OVER (PARTITION BY id ORDER BY adate desc) AS ROW,...
August 27, 2010 at 10:52 am
Hi ,
Try this script
Declare @t table(id int, amount varchar(10),adate datetime)
insert into @t select 1,'120', dateadd(day,-1,getdate())
insert into @t select 2,'121', getdate()
insert into @t select 1,'122', dateadd(day,-2,getdate())
insert into @t select 4,'123', getdate()
insert...
August 27, 2010 at 10:39 am
Hi,
Create INSERT Trigger on the table and put previous script.
August 27, 2010 at 10:06 am
Hi,
I dont think you can do this from sql server 2000.
If you have 2005 management studio then do the below to generate insert query
Right click on a table then choose...
August 27, 2010 at 5:55 am
Hi,
I would suggest you to create stored procedure with your script and setup job in SQL server agent.
For multiple database just update databasename1 --> your db name
SELECT OBJECT_NAME(A.object_id) AS...
August 27, 2010 at 5:43 am
Viewing 8 posts - 1 through 8 (of 8 total)