LinkedIn
Copied!

Table of Contents

Deleting the records from the FACT table in Microsoft SQL Server databases

Version:

Only available versions of this content are shown in the dropdown

Perform this procedure to delete records from the FACT table in a Microsoft SQL Server database.

  1. Connect to the source database.

  2. Execute the following script:

    DELETE FROM <SOURCE_DATABASE>.<SOURCE_SCHEMA>.PR_DATA_IH_FACT WHERE PXOUTCOMETIME < CONVERT(data_type(length),expression,style);

Example

DELETE FROM <SOURCE_DATABASE>.<SOURCE_SCHEMA>.PR_DATA_IH_FACT WHERE PXOUTCOMETIME < CONVERT(DATETIME,'30-06-15 10:34:09 PM',5);, where:

data_type is DATETIME

expression is the date value in quotes

style is 5 (Italian format)

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.