Popular Posts

SQLblog.com - The SQL Server blog spot on the web

Wednesday, September 20, 2017

Challenge: Insert a specific number of rows based on an integer column in one query!

SQLServerCentral » Latest topics
Challenge: Insert a specific number of rows based on an integer column in one query!
I am creating promo codes. They are issued simply by inserting a record for the customer into the PromoCode table. I have a CTE (could also use a temp table) which looks like this:
[code language="sql"]Customer

No comments: