Reply to Re: Indexing a View

Your name:

Reply:


Posted by Bethany Holliday on 11/06/74 11:34

Alexander,

Thanks again. I will try your suggestions. I did, however, want to
answer your questions just in case I'm making this much more difficult
that I need to. ;)

The type for emp1, emp2 & emp3 is decimal.

I need the disc field to be equal to zero. The actual values in the
disclosure field in the base table are 0, 1, or 2. Intitially I had
this field in the select statement set as disc = 0, but because the
error I was receiving, I thought perhaps it didn't like my equal (=)
sign - setting the value to 0 - so I changed it to multiply the whatever
was there by zero to give me a value of zero.

As for the condition :
and ((disc = '0') or (disc <> '0' and (emp1 <> 0 or emp2 <> 0 or emp3 <>
0)))

That's a little more complicated but here's my attempt to explain it.
In the base table we have disclosure codes of 0, 1 or 2. In the case of
records where ownership = 0 (which is another condition in my where
clause). Generally - for most things, we only want to pull and show
data where disc = 0 - however, in this case, if there is a disc <> 0 AND
there are actual data values > 0 in any of the emp fields, we want to
pull that record and create average wage. The reason I need the
condition is that there can be true zeros in a field, but I don't want
to pull back any records where disc <> 0 and there are zeros in any of
the emp field. This gives me a divide by zero error.

Does that make sense?

Thanks!
Bethany




*** Sent via Developersdex http://www.developersdex.com ***

[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

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