Re: [SQL] Help: Using a regular expression match as a value

2000-10-24 Thread [EMAIL PROTECTED]
Richard, Please correct me if I am wrong. You want to do something like: select $1 from captives where firstname ~ '^(R[^ \t,]*d)$'; And get as result: lastname Richard Richard Richard Ricard Richard Rolland Richard In this case, the above query is same as: select firstname from captives whe

[SQL] Help: Using a regular expression match as a value

2000-10-23 Thread Richard DeVenezia
I am just getting started with pgsql and have read available docs I can find. I know I can match a row in a where clause using a regular expression. How can I use what was regexp matched (e.g. perl $1,$2, etc...) as a column assignment ? I'm looking for something like this? select ... ... $1 of