var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Update using Substr in SQL
I am new to doing fancy updates and I am in need of help....
I need to change the first four digits in a field. Here is my sql:
set substr(pkt_ctrl_nbr,1,4) = 'EUAZ'
where substr(pkt_ctrl_nbr,1,4) like 'EUAT%';
can anyone help me?
Originally Posted by cboden
set pkt_ctrl_nbr = 'EUAZ' || substr(pkt_ctrl_nbr, 5, ddd)
where pkt_ctrl_nbr like 'EUAT%';
ddd in above substr is the max length of your column pkt_ctrl_nbr
BTW, I changed your predicate by removing the substr to make it more efficiently. Another alternative is:
where substr(pkt_ctrl_nbr, 1,4) = 'EUAT';
Worked like a charm...thank you....