Viewing 15 posts - 1 through 15 (of 17 total)
You can try this too :
update table
set c1 = convert(int,c1)+convert(int,c2)
where isnumeric(c1) = 1
and isnumeric(c2)= 1
Jeff.
October 15, 2012 at 4:27 pm
hmmm, it's dirty but it's works fine.
;with CTE as (select * from table
where c1 like '%[0-9]%'
and c1 not like '%[a-z]%')
update cte
set c1 = convert(int,c1)+convert(int,c2)
where c2 like '%[0-9]%'
and c2 not...
October 15, 2012 at 3:14 pm
You can try this :
update table
set column1 = convert(int,column1) + convert(int,column2)
Jeff.
October 15, 2012 at 2:54 pm
Hi,
SELECT CustomerName FROM Customer c
LEFT OUTER JOIN CustomersOrders co ON c.CustomerID = co.CustomerID
WHERE co.CustomerID is null
Jeff.
October 14, 2012 at 3:07 pm
Yes you can do that with the script above.
Jeff.
October 6, 2012 at 2:26 am
Something like that must work 🙂
CREATE TABLE dbo.YourTableTemp (column_a INT IDENTITY(500,1),column_b NVARCHAR(25) ) ;
SET IDENTITY_INSERT YourTableTemp ON
INSERT INTO YourTableTemp (column_a,column_b)
SELECT column_a,column_b FROM YourTable
SET IDENTITY_INSERT YourTableTemp OFF
EXEC sp_rename 'YourTable','YourTableOld'
EXEC sp_rename 'YourTableTemp','YourTable'
Jeff.
October 5, 2012 at 3:13 pm
Hi,
If your column is already an Identity Column :
DBCC CHECKIDENT (YourTable, RESEED, 499)
Jeff.
October 5, 2012 at 3:00 pm
Maybe with "sp_start_job" in a TSQL Script Step
Like
IF (SELECT DATENAME(DW,GETDATE())) <> 'Sunday'
BEGIN
exec sp_start_job @job_name = 'YourJob',@step_name = 'StepOne'
END
ELSE
BEGIN
exec sp_start_job @job_name = 'YourJob2',@step_name = 'StepFour'
END
In fact one job trigger the...
July 16, 2012 at 7:47 am
Hello,
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.Tmp_Table1
(
ID int NOT NULL IDENTITY (28966, 1),
Name varchar(25) NULL
) ON [PRIMARY]
GO
SET...
July 16, 2012 at 12:04 am
Your mail profile was enabled before the Agent restart?
Jeff.
October 13, 2011 at 7:25 am
Hi,
Have you restart your SQL Agent after the operator set up?
Jeff.
October 13, 2011 at 6:58 am
Hi,
select datediff(hh,(select top 1 start_time from mytable order by id asc),
(select top 1 end_time from mytable order by id desc))
Jeff.
October 12, 2011 at 12:11 am
Hi,
Have you check the checkbox "Enable FILESTREAM for file I/O streaming access" and "Allow remote clients to have streaming access to FILESTREAM data" in SQL Server Configuration Manager / SQL...
September 23, 2011 at 3:07 am
I already have the same problems with SSIS. But with a replace of "Initial Catalog" by "Database" in the connection string it's good.
Data Source=ServerB;Database=DBA;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;
Jeff.
September 22, 2011 at 3:48 pm
Viewing 15 posts - 1 through 15 (of 17 total)