Re: [SQL] case insensitive search

2000-07-02 Thread [EMAIL PROTECTED]
Joern, select myfield from tablea where lower(myfield) = 'mysearch'; or select myfield from tablea where myfield ~* 'mysearch'; Troy > > Hello together, > > how can I handle case insensitive search in a table? > > > > -- > Linux is like wigwam - no windows, no gates, apache inside. > In

[SQL] isnull or coalesce isn't working

2000-07-02 Thread Jochen Schmidt
HI just started using postgres I want to do a select like the following. I have a table with two columns a and b, in b sometimes data are missing. I want to select column b, and if data are missing instead column a as one column in my select. I did: SELECT ifnull(a,b) FROM table; ==>ERROR: No s

[SQL] error 3122 in ACCESS -

2000-07-02 Thread Schlobohm, Jack
I have a query which uses an expression... dividing "1" by a number field in a static table. I changed the expression to divide by a different number field from the same table. This caused an error. Error 3122: I tried to execute a query that doesn't include the specific expression < * > as par

[SQL] case insensitive search

2000-07-02 Thread Joern Muehlencord
Hello together, how can I handle case insensitive search in a table? -- Linux is like wigwam - no windows, no gates, apache inside. In diesem Sinne Joern

Re: [SQL] Query about using arrays (for accessing pg_group)

2000-07-02 Thread Tom Lane
Greg Wickham <[EMAIL PROTECTED]> writes: > If I try the half intuitive approach > z=> select groname from pg_group where grolist = 21; > ERROR: Unable to identify an operator '=' for types '_int4' and 'int4' > You will have to retype this query using an explicit cast > The cause of my pro

Re: [SQL] retrieving a serial number

2000-07-02 Thread Joachim Trinkwitz
"Robert B. Easter" <[EMAIL PROTECTED]> writes: > You can do something like this: > $var = SELECT nextval('seq_name'); > INSERT INTO master (id, ...) VALUES ($var, ...); > INSERT INTO slave1 (id, ...) VALUES ($var, ...); Great feaure. What to do when importing some previous data from ascii files

[SQL] Query about using arrays (for accessing pg_group)

2000-07-02 Thread Greg Wickham
Howdy, Am trying to implement a user/group based security model for accessing a database which is tightly integrated with the postgresql security model. The problem I am having is that I am not sure how to check which groups a user is in. For example, if I have a user (with id of 21) in a grou