sachinleo78
SSC Enthusiast
Points: 195
More actions
December 10, 2019 at 8:12 am
#3706273
i have a value say 11 in one of my columns i need to compute and break it in two separate columns A and B like 6 and 5
Phil Parkin
SSC Guru
Points: 247180
December 10, 2019 at 12:01 pm
#3706428
Like this?
DROP TABLE IF EXISTS #t1;CREATE TABLE #t1( c1 INT);INSERT #t1( c1)VALUES(2 ),(11),(4),(9);SELECT t.c1 ,c2 = t.c1 / 2 ,c3 = t.c1 - t.c1 / 2FROM #t1 t;
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply