Re: [SQL] Inquiry From Form [pgsql]
Jack Kiss <[EMAIL PROTECTED]> writes: > 1)Do you have a function which is similar to Oracle\'s DECODE. Yes > 2) Can you extract day of week (Monday,etc) from yours date functions. Yes Check out the "Date/Time Function and Operators" and the "Conditional Expressions" sections of this: http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/functions.html -- greg ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] default operator class (PostgreSQL's error?)
Denis Zaitsev <[EMAIL PROTECTED]> writes: > ERROR: data type name_t has no default operator class for access method "btree" Hm, that looks like it should work. You sure you marked the opclass default? (Check its row in pg_opclass to see.) Another possibility is that the opclass is in a schema that is not in your search path --- I can't recall right now whether being in the search path affects lookup of a default opclass. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] Beginner needs help
Aaron Chu wrote: >Hi, > >I have a table which has a column of surnames (string) and I would like >to know how can I retrieve (SELECT) all the repeated surnames, i.e. >more than one person who has the same surname. >Thanks. What exactly you want to do? To eliminate duplicates? Use then: select surname from users group by surname; Maybe you want to know which surnames are duplicated? Use then: select surname from users group by surname having count(*)>1 Regards, Tomasz Myrta ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [SQL] default operator class (PostgreSQL's error?)
I've found a reason! It's some namespace problem - there are other tho name_ops operator classes exist. My becomes third. All are the default for (their) type. And somewhere there is the issue. Renaming my operator class into, say, name_t_ops resolves the problem. Thanks for the info. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])