Reply to Re: help with a query

Your name:

Reply:


Posted by --CELKO-- on 02/27/07 20:09

Let me be the bad guy -- I have practice -- and elaborate on Ed's
remark.

>> MyTable {field1, field2, startdate, enddate} <<

is useless. Ignoring the bad column and table names, ignoring the
confusion of columns with fields implied by your bad choices, this
could be any of the following:

CREATE TABLE MyTable
(field1 ?? DEFAULT ?? [NOT NULL]
[CHECK (??)],
field2 ?? DEFAULT ?? [NOT NULL]
[CHECK (??)],
start_date DATETIME [NOT NULL],
end_date DATETIME [NOT NULL],
[CHECK (start_date [< | <=] end_date)
[PRIMARY KEY (??)] );

Do you see how many tens of thousands of possible schemas we have to
filter thru because you do not know how to post a spec? If you want
us to do your homework or your job for you, then at least give us a
spec!!

"[I need] Data! Data! Data! I can't make bricks without clay."
-- Sherlock Holmes (fictional detective of author Sir Arthur Conan
Doyle)

Oh, the use of CASE inside aggregate functions is a standard SQL-92
programming trick which you will find useful. Look at the new OLAP
functions which can also be passed to an aggregate -- a trick most SQL
programmers do no tyet know.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация