Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

is it possible to replace While loop by cte ?

$
0
0
HI Folks,Is it possible to replace while loop by CTE?I will fetch records from table 1 based on tretmentid.get the count of recordsrun the while loop inside loop i will compare the column values with the same table(table 1) for different tretmentid.if any one row matches will come out from loop and send status .can it be replaced by CTE ?Regards,Ravi

Viewing all articles
Browse latest Browse all 3145

Trending Articles