Skip to content

Find matching pattern

I have a table that contains multiple strings pattern (‘Q88 9WE’,’S9 D2P’,WC2R 3LS etc..). How do I extract and split the rows that meet only the pattern Where A is a character in the range A-Z and N is a digit 1-9 I have tried using the logic below and it doesn’t seem to work I&…

SQL Join – If it doesn’t find any, try another parameters

Let’s suppose we have the following query: If that LEFT JOIN doesn’t find nothing, I need to change the ON parameters to something like: That second LEFT JOIN only needs to run if the first one doesn’t return nothing. How can I achieve that behaviour? I have already tried with an OR statemen…

Separate numeric values and character values in oracle

A table contains both numeric and character values in a column. The numeric values and character values need to be separated in different columns Col1 1 2 3 A B C The output needs to be col1 col2 1 A 2 B 3 C Answer You could do this using conditional aggregation: You cold simplify this a bit using a