Oracle updates more than one data

Source: Internet
Author: User

Select Sid, CJSJ
From BASE_ZJXX
where CJSJ = to_date (' 0001/1/1 ', ' yyyy/mm/dd ');

SELECT *
From Sys_user
where Qyid in (90656, 90655, 90646, 90641, 90636, 90633, 90631);

UPDATE base_zjxx
SET CJSJ = (case
When Zjid = ' 90656 ' Then
To_date (' 2015/4/7 15:57:49 ', ' yyyy/mm/dd hh24:mi:ss ')
When Zjid = ' 90655 ' Then
To_date (' 2015/4/7 14:45:15 ', ' yyyy/mm/dd hh24:mi:ss ')
When Zjid = ' 90646 ' Then
To_date (' 2015/4/3 10:45:01 ', ' yyyy/mm/dd hh24:mi:ss ')
When Zjid = ' 90641 ' Then
To_date (' 2015/4/2 9:43:55 ', ' yyyy/mm/dd hh24:mi:ss ')
When Zjid = ' 90636 ' Then
To_date (' 2015/4/1 15:58:11 ', ' yyyy/mm/dd hh24:mi:ss ')
When Zjid = ' 90633 ' Then
To_date (' 2015/4/1 14:32:58 ', ' yyyy/mm/dd hh24:mi:ss ')
When Zjid = ' 90631 ' Then
To_date (' 2015/4/1 10:30:23 ', ' yyyy/mm/dd hh24:mi:ss ')
ELSE
Cjsj
END)
where Zjid in (90656, 90655, 90646, 90641, 90636, 90633, 90631)

Update BASE_ZJXX T1 Set
T1.CJSJ =
(Select Create_date
From Sys_user T2
where T1.zjid = T2.sid) where
T1.CJSJ = to_date (' 0001/1/1 ', ' yyyy/mm/dd ')

Oracle updates more than one data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.