Is it possible to store data in 12 sets or bets in SQL? I have a query that should check before entering a new row if the existing records are less than or equal to twelve, if they are twelve, then it should create a new batch which also stores the maximum of twelve records.
There is no underlying concept of data batching in SQL Server or any other SQL-like database that you describe It is a data grouping / relationship, which is the responsibility of the database designer. What you should do, create a related table, which is called batches, give it the primary key, then place that primary key column along with the data in the form of a foreign key in your original table. Regarding the argument when batches are made, then it should probably be defined in the trigger, or define the argument in the UDF and set the default value of that batch ID to the result of that UDF.
Comments
Post a Comment