Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Like Comparison

Status
Not open for further replies.

smeaggie

Programmer
Joined
May 5, 2004
Messages
8
Location
NL
Hello Everyone

I am using the like Comparison to get a result from a column in POSTGRESQL.
The problem is that i can't retrieve the records who are not beginning with the charachter A to Z. I've tried many things.

EXAMPLE:

select name from company where name ~* '[^A-Z]%';

Can Someone help

Thanks in Advance,

Chris




 
you've made a mix between the two ways I know ;-))

one way is (I'm not sure in which pg version it appears)

select name from company where name similar to '[^A-Z]%';

the other which should work any where is

select name from company where name ~ '^[^A-Z]';
 
Thank you it works well, i took the last one.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top