Hello, when writing code in TSQL, a problem arose, I could not find the answer in Google :(
There are 2 tables:
- AA (id int, somestring char) and
- BB (id int, somestring char, somedate datetime)
There is also an initialized @thedate variable of type datetime.
How do you write Insert so that as a result of its execution all the records from AA are copied to BB: the ID and somestring fields, respectively, and the somedate field to be filled with the value of the @thedate variable?
Thank you in advance!