How to execute a loop in a stored procedure to insert the data in a SQL query?
For demo, I have a gridview in that there is 10 rows of data now that 10 rows of data I want to insert into a table through a stored procedure.
So, as per the logic to insert that 10 rows of data I want to use the loop. Now, the problem that only that how can I use loop of that gridview in the stored procedure.
The screenshot show there are columns:
srno, accountname, cramount, dramount, tdsamt, sgstamt, cgstamt, igstamt
Now, how I will insert this multiple data(as per in image shown) in tmptable through a stored procedure?
Please help me to solve this issues.
Thank you.
