SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,799 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have 8 group name to insert to 1000 row repeatably. How to do it in Data Services to generate automatically the 5 username insert to 1000 row ?
thanks.
Not sure what you mean with Data Services, but there are so many products in the Data Platform sphere, I can't keep track of them all.
In plain SQL query you can do:
SELECT BIL, POSKOD, STATUS, KETERANGAN, LOKASI,
row_number() OVER(ORDER BY BIL) / % 8 + 1
FROM tbl
The row_number function numbers the rows ordered by what you specify in the ORDER BY clause. %
is the modulus operator.