Re: solve this query
Date: Thu, 13 Oct 2011 06:42:09 -0700 (PDT)
Message-ID: <3b7b60c8-74d0-41d1-b0f2-c107787152f4_at_w5g2000yqd.googlegroups.com>
"A problem well stated is a problem half solved." -- Charles F. Kettering
Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. If you know how, follow ISO-11179 data element naming conventions and formatting rules. Temporal data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect.
Sample data is also a good idea, along with clear specifications. It is very hard to debug code when you do not let us see it. If you want to learn how to ask a question on a Newsgroup, look at: http://www.catb.org/~esr/faqs/smart-questions.html
What you did post was bad SQL. Bit flags?, improper data element names? Formatting data for display in the database? Scalar subqery in a SELECT list? A magic generic "id"? The three-letter strings for subscription mode are shorter than an INTEGER and readable. Do yu really need the time fields in the timestamps?
These are all classic SQL programming errors. Received on Thu Oct 13 2011 - 15:42:09 CEST