how to merge data from one table to another, student id assign
Good Morning,
how to assign query one results to query 2 student id, each record should have each value, rather assigning one to all 20k students. please advise. i tried one but it is assigned same id to all STG_Student. please
— Query 1
SELECT STATESTUDENTID
FROM DEV_SLDS.LEGACY.STUDENTIDPOOL
WHERE IDSTATUS = ‘UNASSIGNED’
AND DATEINITIALASSIGNED IS NULL
— This query resylts gives several thousands of studentid numbers that are never assigned to student.
— Query 2 this STATEIDENTIFICATIONNUMBER need to populate with query 1 each record should have one unique record from query 1
SELECT * FROM STAGE.STG_STUDENT s
SET STATEIDENTIFICATIONNUMBER = Assign from STUDENTIDPOOL.STATESTUDENTID
WHERE COMMENTS = ‘NEW ID FROM POOL REQUIRED’
and trim(FILEID) = trim(‘a0xHv000000fNWqIAM ‘)
AND STATEIDENTIFICATIONNUMBER IS NULL;
Thank you,
Asit
Good Morning, how to assign query one results to query 2 student id, each record should have each value, rather assigning one to all 20k students. please advise. i tried one but it is assigned same id to all STG_Student. please — Query 1SELECT STATESTUDENTIDFROM DEV_SLDS.LEGACY.STUDENTIDPOOLWHERE IDSTATUS = ‘UNASSIGNED’AND DATEINITIALASSIGNED IS NULL— This query resylts gives several thousands of studentid numbers that are never assigned to student.– Query 2 this STATEIDENTIFICATIONNUMBER need to populate with query 1 each record should have one unique record from query 1SELECT * FROM STAGE.STG_STUDENT sSET STATEIDENTIFICATIONNUMBER = Assign from STUDENTIDPOOL.STATESTUDENTIDWHERE COMMENTS = ‘NEW ID FROM POOL REQUIRED’and trim(FILEID) = trim(‘a0xHv000000fNWqIAM ‘)AND STATEIDENTIFICATIONNUMBER IS NULL; Thank you,Asit Read More