IF NOT EXISTS(SELECT 1 FROM sys.columns 
          WHERE Name = N'YRKESGRUPP'
          AND Object_ID = Object_ID(N'LD0P0C30'))
BEGIN
ALTER TABLE LD0P0C30 
	ADD YRKESGRUPP DECIMAL(9)
	CONSTRAINT LD0P0C30_YRKESGRUPP DEFAULT 0 NOT NULL
END
;

IF NOT EXISTS(SELECT 1 FROM sys.columns 
          WHERE Name = N'ORG_OID'
          AND Object_ID = Object_ID(N'LD0P0C30'))
BEGIN
ALTER TABLE LD0P0C30 
	ADD ORG_OID VARCHAR(100)
	CONSTRAINT LD0P0C30_ORG_OID DEFAULT 0 NOT NULL
END
;

IF EXISTS (SELECT 1 FROM SYS.VIEWS WHERE NAME='LD0V0C30')
BEGIN
DROP VIEW LD0V0C30 
END
;
CREATE VIEW LD0V0C30 AS
	SELECT * FROM LD0P0C30 
;

IF EXISTS (SELECT 1 FROM SYS.VIEWS WHERE NAME='LD0VYC30')
BEGIN
DROP VIEW LD0VYC30 
END
;
CREATE VIEW LD0VYC30 AS
	SELECT * FROM LD0P0C30 
;
