MySQL Forums
Forum List  »  Stored Procedures

Re: Insert into dynamic tableName
Posted by: Peter Brawley
Date: August 17, 2019 11:33AM

> DECLARE vLedgerYear varchar(20) default "";
> ...
> SET @vLedgerYear = "ledger" + substring(p_period, 1, 2);

SET @vledgerYear ... creates a user variable of that name, does not refer to the declared variable vLedgerYear.

Apart from that, not enough info. What problem are you having? What error msgs?

Options: ReplyQuote


Subject
Views
Written By
Posted
507
August 17, 2019 10:43AM
Re: Insert into dynamic tableName
245
August 17, 2019 11:33AM
190
August 17, 2019 02:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.