Deleting the records from the FACT table in Microsoft SQL Server databases
Perform this procedure to delete records from the FACT table in a Microsoft SQL Server database.
-
Connect to the source database.
-
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)