I am trying to write this query:
SELECT DISTINCT createdcfgid FROM ab WHERE (createdcfgid ~ ‘^[0-9]+$’)
This results in
syntax error at or near "[" LINE 3: WHERE (createdcfgid ~ ‘^[0-9]+$’)
Anyone there who can give me a clue about what I am doing wrong?
Thanks in advance
It does just look like you are using the wrong quotes, try
'rather than‘:PostgreSQL 8.4 Schema Setup:
Query:
Results:
this on SQL Fiddle