Skip to content

Instantly share code, notes, and snippets.

@ilhamarrouf
Created March 14, 2019 14:07
Show Gist options
  • Select an option

  • Save ilhamarrouf/4598f71a18895c5dc240431485654deb to your computer and use it in GitHub Desktop.

Select an option

Save ilhamarrouf/4598f71a18895c5dc240431485654deb to your computer and use it in GitHub Desktop.
INSERT SELECT Query
INSERT INTO batman20190306.public."EventParticipant"
SELECT '2019-03-14' :: date AS "BEGDA",
'9999-12-31' :: date AS "ENDDA",
'1000' AS "BUSCD",
nik AS "PERNR",
'2019-03-14' :: date AS "CHGDT",
'12345678' AS "CHUSR",
'5c8a5cf5ed684' AS "EVNCD"
FROM batman20190306.public."User"
WHERE level_id IN ('1', '2', '3', '4');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment