Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

update sql oracle query

Can someone help to update a column in Oracle SQL with the VARCHAR2 format?
All the methods do not work.
Thank you in advance!

UPDATE CYCLESTATUS SET SESSIONINSTANCEID = 'P27SEK0404202201';

‘P27SEK’+current date(04042022)+’01’

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use || for concatenation and if you want the current date you can use TO_CHAR to extract the date string in specific format:

'P27SEK'|| TO_CHAR(SYSDATE,'DDMMYYYY')||'01'
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading