Case when in and oracle

Source: Internet
Author: User

--- SQL Server statement: SELECT COUNT (1 ), remark FROM (SELECT Remark = case when Remark LIKE '% check tkt time % 'then' there is a problem WITH the retention TIME 'when Remark LIKE' % WITH "AV" AGAIN % 'then' there is no space 'When Remark LIKE 'duplicate tel number % 'then' the specified office number is repeated. 'When Remark LIKE '% invalid foid % 'then' the certificate NUMBER is incorrect. 'else' additional 'end' FROM JinRiLogger. dbo. userOperateLog201307 WITH (NOLOCK) WHERE OperateType = 8) AS a group by. remark --- oracle statement: selectcase when Remark LIKE '% check tkt time % 'then' there is a problem WITH the retention TIME 'when Remark LIKE' % WITH "AV" AGAIN % 'then' there is no space 'when Remark LIKE 'duplicate tel number % 'then' the specified office number is repeated. 'When Remark LIKE '% invalid foid % 'then' id number is incorrect. 'else' additional 'end, count (*) FROM JinRiLog. userOperateLog partition (p2) where Operatetype = 8 group byCASE WHEN Remark LIKE '% check tkt time % 'then' there is a problem WITH the retention TIME 'when Remark LIKE' % WITH "AV" AGAIN % 'then' there is no space' WHEN Remark LIKE 'duplicate tel number % 'then' the specified office number is repeated. 'When Remark LIKE '% invalid foid % 'then' the id number is incorrect. 'else' additional 'end;


This article is from "record bit by bit !" Blog, please be sure to keep this source http://ocpyang.blog.51cto.com/3401739/1300170

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.