Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
2k views

Duplicating rows based on a count column SQL Server [duplicate]

I have the following table: MyTable PlaceID NameID Code CodeCount 1 1 1234A 2 1 2 1234A 3 1 3 1234A 1 2... 2... 3... 3... I want to select 1234A where ...
Dan's user avatar
  • 167
3 votes
2 answers
3k views

Use random string variable in a insert

This is one of my first tries to code something. I'm trying to develop a code, to add first name, last name, and date, randomly. I have this for now: declare @date date, @val1 int, @...
Racer SQL's user avatar
  • 7,484