Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

IDENTITY_INSERT

I am reicieveing and error of
Cannot insert explicit value for identity column in table 'MEDISPAN_NDCHIST_QA' when IDENTITY_INSERT is set to OFF.
Cannot update identity column 'NDC_ID'.
Can someone please assist. The NDC_ID is set as the Identity in SQL. I have attached a few screen shots as well.
0683p000009MDWk.png 0683p000009MDWl.png
Labels (2)
11 Replies
Anonymous
Not applicable
Author

Hi Kwags,
This is for your reference:
Type 0: is not used frequently. Some dimension data may be overwritten and other may stay unchanged over time. This is most appropriate when no effort has been made to deal with the changing dimension issues.
Type 1: no history is kept in the database. New data overwrites old data. Use this type if tracking changes is not necessary. this is most appropriate when correcting certain typos, for example the spelling of a name.
Type2: the whole history is stored in the database. This type tracks historical data by inserting a new record in the dimensional table with a separate key each time a change is made. This is most appropriate to track updates, for example.

SCD Type 2 principle lies in the fact that a new record is added to the SCD table when changes are detected on the columns defined. Note that although several changes may be made to the same record on various columns defined as SCD Type 2, only one additional line tracks these changes in the SCD table.

The SCD schema in this type should include SCD-specific extra columns that hold standard log information such as:
-start: adds a column to your SCD schema to hold the start date. You can select one of the input schema columns as a start date in the SCD table.
-end: adds a column to your SCD schema to hold the end date value for a record. When the record is currently active, the end date is NULL or you can select Fixed Year Value and fill in a fictive year to avoid having a null value in the end date field.
-version: adds a column to your SCD schema to hold the version number of the record.
-active: adds a column to your SCD schema to hold the true or false status value. this column helps to easily spot the active record.
Type 3: only the information about a previous value of a dimension is written into the database. This type tracks changes using separate columns. This is most appropriate to track only the previous value of a changing column.
Best Regards,
Mayur
Anonymous
Not applicable
Author

Ok,
Thank you both for the great information. And thank you for bearing with me as i am new to all of this..
I changed somethings around and i am not getting the error in the pic below.
0683p000009MDWu.png 0683p000009MDWz.png 0683p000009MDX4.png