fix www.websitepanel.net/global-forums/topic/2-1-0-242-sql-update-bug-when-going-from-2-1-0-227/
This commit is contained in:
parent
5d180a5800
commit
8ab1b7a9af
1 changed files with 9 additions and 5 deletions
|
@ -2632,14 +2632,18 @@ GO
|
||||||
IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='CRMUsers' AND COLS.name='CALType')
|
IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='CRMUsers' AND COLS.name='CALType')
|
||||||
BEGIN
|
BEGIN
|
||||||
ALTER TABLE [dbo].[CRMUsers] ADD
|
ALTER TABLE [dbo].[CRMUsers] ADD
|
||||||
[CALType] [int] NULL;
|
[CALType] [int] NULL
|
||||||
|
|
||||||
UPDATE [dbo].[CRMUsers]
|
|
||||||
SET
|
|
||||||
CALType = 0;
|
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
UPDATE [dbo].[CRMUsers]
|
||||||
|
SET
|
||||||
|
CALType = 0 WHERE CALType = NULL
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
ALTER PROCEDURE [dbo].[InsertCRMUser]
|
ALTER PROCEDURE [dbo].[InsertCRMUser]
|
||||||
(
|
(
|
||||||
@ItemID int,
|
@ItemID int,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue