Skip to content
Advertisement

Concate string into temp table in cursor

I have a temp table structure @temp2 like this

and would like to add the driverID column with a result like 5555, 68989

to do this, I use the cursor to loop another table look like this

Here is the code

sadly, I got the driverID column is null

and would like to have finalized temp table look like this:

Advertisement

Answer

Result here

enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement