Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Calculated fields lose their calculation #30

Closed
MortimerCat opened this issue Jun 29, 2018 · 0 comments
Closed

Calculated fields lose their calculation #30

MortimerCat opened this issue Jun 29, 2018 · 0 comments
Labels

Comments

@MortimerCat
Copy link

Type

What kind of issue is this?

[X ] Bug report.
[ ] Feature request.

Current Behavior

I have a column [drv_lock_ID] which is essentially an alias of the column [_lock_ID] that generates its own unique ID. SSC exports these as two separate independent fields.

    [_lock_ID] nvarchar(50) collate Latin1_General_CI_AS not null default(newid()),
    [drv_lock_ID] as null nvarchar(50) collate Latin1_General_CI_AS not null,

Expected behavior

These are the corresponding lines generated by MSSQL studio.

	[drv_lock_ID]  AS ([_lock_ID]),
	[_lock_ID] [nvarchar](50) NOT NULL,

ALTER TABLE [dbo].[driver] ADD  CONSTRAINT [DF__driver_lock]  DEFAULT (newid()) FOR [_lock_ID]

Steps to Reproduce

To reproduce, create a calculated column and set it to equal another column.

Other Information

As the current scripts stands, I would be able to recreate my tables then manually recreate the _lock_ID aliases

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants