Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

PostGreSQL with Regex

$
0
0
Hi All

I'm trying to write a case statement which examines if a user has correctly or incorrectly put in comments into a system based on a standard compliance manual. Im trying to do this with Regex

The user is supposed to input it something like X OF Y
so for example '15 of 20' where 15 is the part they are on and 20 is the total number of parts associated with the equipment. The 'of' portion of the text can be upper or lower case

I'm using a CASE statement something along the lines of

Code:

CASE WHEN WHEN remark \d ~*[O]~*[F] THEN 'Compliant'
Obviously this is very wrong. I have checked around Google and the forums but its not very clear to me in the explanations i have found

Any help would be greatly appreciated

Thanks for your time

Viewing all articles
Browse latest Browse all 13329

Latest Images

Trending Articles



Latest Images