Viewing 5 posts - 1 through 5 (of 5 total)
thanks alot guys i really learned quite a bit and appreciate the help. drew.allen i was headed in that direction via chris' info
March 23, 2017 at 12:52 pm
okay that went over my head:
Use ROW_NUMBER() to number the rows in table b in a CTE, then join to table a - either on table a id, or...
March 23, 2017 at 12:31 pm
I'm trying to sequentially get the row of id's from TableB.id into TableA.tableid from row 1 to row 4512
TableB
id
123
456
end results to...
March 23, 2017 at 12:12 pm
i tried this:
UPDATE TableA
SET tablebid = t1.id
FROM TableB t1
where t1.id IN (
SELECT NULL AS id FROM TableA WHERE tableid IS NOT null
UNION
March 23, 2017 at 11:38 am
i don't have a way to join the two tables as TableA.tablebid is null.
select tablebid,null as id from TableA
union
select null,id from TableB
results were like:
March 23, 2017 at 11:14 am
Viewing 5 posts - 1 through 5 (of 5 total)