Re: [SQL] have you feel anything when you read this ?

2006-03-31 Thread Stephan Szabo
On Fri, 31 Mar 2006, Eugene E. wrote: > Peter Eisentraut wrote: > > Eugene E. wrote: > > > >>the problem is: you'll get this four byte sequence '\000' _instead_ > >>of NUL-byte anyway. > > > > > > What you seem to be missing is that PostgreSQL data can be represented > > in textual and in binary f

[SQL] query; check for zero and floats

2006-03-31 Thread vince
I'm trying to do a simple query and I'm not sure how to get it to work: SELECT SUM(x0 + y0 + z0) / SUM(x2 + y2) AS A1, SUM(x1 + y1 + z1) / SUM(x3 + y3) AS A2 FROM test Problems: 1. All variables are integers. When it does the division, it returns an integer, but I want a float. (I've tried num

Re: [SQL] query; check for zero and floats

2006-03-31 Thread Tom Lane
[EMAIL PROTECTED] writes: > I'm trying to do a simple query and I'm not sure how to get it to work: > SELECT SUM(x0 + y0 + z0) / SUM(x2 + y2) AS A1, SUM(x1 + y1 + z1) / SUM(x3 + > y3) > AS A2 > FROM test > 1. All variables are integers. When it does the division, it returns an > integer, but I w

Re: [SQL] query; check for zero and floats

2006-03-31 Thread Joe Conway
[EMAIL PROTECTED] wrote: I'm trying to do a simple query and I'm not sure how to get it to work: SELECT SUM(x0 + y0 + z0) / SUM(x2 + y2) AS A1, SUM(x1 + y1 + z1) / SUM(x3 + y3) AS A2 FROM test Problems: 1. All variables are integers. When it does the division, it returns an integer, but I wan