Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing a date with blank

Status
Not open for further replies.

anniez

IS-IT--Management
Apr 13, 2001
43
US
I have a trigger that, if it finds a matching record to update, puts in the current data.
There is a date field that should be made blank. Can you help me with the syntax?
set
a=:new.a,
b=:new.b,
dscdate = ?????
where id=:new.id;
 
I should have been more specific. It will only be null if the unitID starts with 3. I have:

dscdate = decode(substr:)new.unitID,1,1),3,NULL)


it doesn't work. Thanks
 
So why don't you use DECODE (you may use select from dual)? Or just if then else?

Regards, Dima
 
IF SUBSTR:)new.unitID,1,1)='3' THEN
dscdate := NULL;
END IF;

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top