Take a look at your statement:
"declere @test table(SLNControl int,ControlOrderBy int) insert into @test values(" + stringData + ")update UIF_ControlProperties set SLNControl= tb.slnControl from @test tb.join UIF_ControlProperties cp on tb.slnControl = sp.SLNControl);
There's several mistakes:
Wrong | Correct |
---|
1. wrong syntax: |
declere | declare |
2. missing space between bracket and update statement |
")update" | ") update" |
3. wrong alias! |
"from @test tb.join UIF_ControlProperties cp on tb.slnControl = sp.SLNControl" | "from @test tb.join UIF_ControlProperties cp on tb.slnControl = cp.SLNControl" |
4. missing double quote at the end of statement! |
("declare ... SLNControl); | ("declare ... SLNControl"); |
But, the worse thing is that you're trying to fetch data when your command is used to modify data instead of select them!