Quantcast
Channel: Toad for Oracle Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4385

RE: Inserting a hard coded value & a value from a select statement

$
0
0
If you are looking for a way to have a hard-coded value, why not put it in the select like this (with or without the distinct depending on your data):

INSERT INTO GOREMAL(GOREMAL_EMAL_CODE, GOREMAL_EMAIL_ADDRESS)
   SELECT DISTINCT '20', UOS_PIDM_ID(SIRASGN_PIDM) || '@sharjah.ac.ae'
   FROM SIRASGN
   WHERE SIRASGN_TERM_CODE = '201620'
     AND NOT EXISTS
            (SELECT GOREMAL_PIDM
             FROM GOREMAL
             WHERE GOREMAL_EMAL_CODE = 20
               AND GOREMAL_PIDM = SIRASGN_PIDM);


Viewing all articles
Browse latest Browse all 4385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>