Subject RE: [ib-support] Re: SQL Help
Author Charlie Kerscher
Thank you for your response. It gave me a very good laugh, in fact I'm still chuckling.
 
Doesn'tWork := NoResults;
 
// Someones else responded that 'trunc' is probably not SQL compatible; just Delphi.
 
Thank you,
Charlie
 
PS: I'm going to have to do the same with Metric; perhaps I ought to go ahead and contact the Commissioner?
--- In ib-support@y..., "Charlie" <charliekerscher@m...> wrote:
> I'm using Delphi 5, Interbase 6. I have an Items table that has
widthstring
> and heightstring as fields. <... formula used to calculate square
feet snipped ...>
>
> How do I use a select sum statement in an SQL to sum the square
feet. I've
> tried:
> select sum(trunc(widthstring + 0.9999) * trunc(heightstring +
0.9999) /
> 144)) but this doesn't work.

[Ah yes, the ever-elusive "this doesn't work".]

Which form of "this doesn't work" are you experiencing?   

For example, are you getting a syntax error? (Looks like you have an
extra right paren in your example, by the way.)  Wrong results?  No
results?  Slow results?  Smoke spewing from server? [Visit from the
Metric Commission?]

Is this the only thing in the select list?

Cheers,
db




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.