At our work we are switching from toad to plsql developer.
I tried to find the answer on this forum and on the internet, but I couldn't find it. I can fall back on the good old sqlplus prompt but I hope sqlplus developer has a solution.
In toad I can run this easyly, but how do I do this in plsql developer?
SET DEFINE ON
DEFINE POLLDATE = 20150731
CREATE TABLE xxx_TOTAL_&POLLDATE
AS
SELECT m.xxx_ID, m.xxx_NAME,
CASE WHEN CD_CODE = '1' THEN DATE_1 ELSE NULL END DAT_ONE,
CASE WHEN CD_CODE = '2' THEN DATE_2 ELSE NULL END DAT_TWO,
FROM xxx_ext_&POLLDATE m
left join SOME_OTHER_TABLE B
on M.XXX_ID = B.xxx_ID
where to_date(&POLLDATE, 'yyyymmdd') >= m.startdate
and to_date(&POLLDATE, 'yyyymmdd')
I tried to find the answer on this forum and on the internet, but I couldn't find it. I can fall back on the good old sqlplus prompt but I hope sqlplus developer has a solution.
In toad I can run this easyly, but how do I do this in plsql developer?
SET DEFINE ON
DEFINE POLLDATE = 20150731
CREATE TABLE xxx_TOTAL_&POLLDATE
AS
SELECT m.xxx_ID, m.xxx_NAME,
CASE WHEN CD_CODE = '1' THEN DATE_1 ELSE NULL END DAT_ONE,
CASE WHEN CD_CODE = '2' THEN DATE_2 ELSE NULL END DAT_TWO,
FROM xxx_ext_&POLLDATE m
left join SOME_OTHER_TABLE B
on M.XXX_ID = B.xxx_ID
where to_date(&POLLDATE, 'yyyymmdd') >= m.startdate
and to_date(&POLLDATE, 'yyyymmdd')