problem versioning stored procedure that use temporal table

dreammaster83dreammaster83 Posts: 3
edited January 25, 2017 9:07AM in SQL Source Control
we are trying to use sql source control 5 on a 2016 db.
we are using system versioned temporal table, sql source control gives me an error on stored procedure and user functions that use fot system_time (error parsing file).
for example:
select * from dbo.ADDETTI_STRUTTURE_VAL ast LEFT OUTER JOIN (SELECT * FROM dbo.IMPIEGHI_VAL FOR SYSTEM_TIME AS OF @reference_date_dt2
				where COD_SOCIETA = @cod_societa) im
			ON im.COD_IMPIEGO = ast.COD_IMPIEGO

source control let me commit the sp but after that when it try the find modified objects it throws the error.

How can i solve this problem?

Comments

  • Hi, thank you for your forum post and sorry that you have encountered a problem.

    What is the full version number of SQL Source Control you are using?

    A support ticket has been created for you: https://redgatesupport.zendesk.com/agent/tickets/81769

    Would you please locate the SQL Source Control log file from the period this error occurred? You will find the log files in this path:
    C:Users<user_name>AppDataLocalRed GateLogsSQL Source Control
    Please attach a copy of the log file to your support ticket or email support@red-gate.com quoting your call reference #81769, with a copy of the log file attached for us to review.

    Many thanks,
    Rob
    Robert Chipperfield
    Red Gate
  • yesterday we updated to version 5.4.2.4269 and the problem seems solved, we were able to commit all our changes and a couple of migration scripts.

    unfortunately today we have again the same problem with this user function:
    CREATE FUNCTION &#91;dbo&#93;.&#91;UFFAST_IMPIEGHI_VAL_GETBYPERIOD&#93;(@datetime AS DATETIME2(0)) RETURNS TABLE
    AS
    RETURN
    SELECT * FROM IMPIEGHI_VAL FOR SYSTEM_TIME AS OF @datetime
    

    i'll attach my log file to the ticket.
Sign In or Register to comment.