------=_Part_23746_12147368.1207729218898
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi
I just want to let you know one thing.
By the way, I'm running Postgres 8.3.1 on windows
I was making a query using pgadmin:
select clau, lecact-lecant as m3, m3any, ta, tc, 3 as mesos, persones,
true
as clavegueram
from fac_abonats
where clau in (select clau from tmp_claus_prova)
order by clau
clau is the primary key of the table fac_abonats
the thing is that the result of the query returns the same number of rows
a=
s
the table fac_abonats (thousands).
select clau from tmp_claus_prova return about one hundred rows, and all
the
values in the column exists
in fac_abonats. So maybe something wrong is happening in the where
clause=
..
At the end I've realized that there is no column named 'clau'. It has
another name.
So the subselect query is wrong, if I execute it alone, an error appears
ERROR: no existe la columna =ABclau=BB
LINE 6: select clau from tmp_claus_prova
^
********** Error **********
ERROR: no existe la columna =ABclau=BB
Estado SQL:42703
Caracter: 188
The question is:
Is it a normal behaviour? Because I think that if the query is wrong,
wouldn't be better to raise an error?
Regards,
Josep ****res
------=_Part_23746_12147368.1207729218898
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi<br><br><br>I just want to let you know one thing. <br>By the way,
I'=
m running Postgres 8.3.1 on windows<br><br>I was making a query using
pgadm=
in:<br><br><span style=3D"font-family: courier new,monospace;">select
clau,=
lecact-lecant as m3, m3any, ta, tc, 3 as mesos, persones, true as
clavegue=
ram</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">from
fac_abonats</span>=
<br style=3D"font-family: courier new,monospace;"><span
style=3D"font-famil=
y: courier new,monospace;">where clau in (select clau from
tmp_claus_prova)=
</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">order by
clau</span><br=
style=3D"font-family: courier new,monospace;"><br>clau is the primary key
=
of the table fac_abonats<br><br>the thing is that the result of the query
r=
eturns the same number of rows as the table fac_abonats (thousands).<br>
select clau from tmp_claus_prova return about one hundred rows, and all
the=
values in the column exists<br>in fac_abonats. So maybe
someth=
ing wrong is happening in the where clause.<br><br>At the end I've
real=
ized that there is no column named 'clau'. It has another
name.<br>
So the subselect query is wrong, if I execute it alone, an error
appears<br=
><br><span style=3D"font-family: courier new,monospace;">ERROR: no
ex=
iste la columna =ABclau=BB</span><br style=3D"font-family: courier
new,mono=
space;"><span style=3D"font-family: courier new,monospace;">LINE 6: select
=
clau from tmp_claus_prova</span><br style=3D"font-family: courier
new,monos=
pace;">
<span style=3D"font-family: courier
new,monospace;">  =
; ^</span><br
s=
tyle=3D"font-family: courier new,monospace;"><br style=3D"font-family:
cour=
ier new,monospace;"><span style=3D"font-family: courier
new,monospace;">***=
******* Error **********</span><br style=3D"font-family: courier
new,monosp=
ace;">
<br style=3D"font-family: courier new,monospace;"><span
style=3D"font-famil=
y: courier new,monospace;">ERROR: no existe la columna
=ABclau=BB</span><br=
style=3D"font-family: courier new,monospace;"><span style=3D"font-family:
=
courier new,monospace;">Estado SQL:42703</span><br style=3D"font-family:
co=
urier new,monospace;">
<span style=3D"font-family: courier new,monospace;">Caracter:
188</span><br=
><br><br><br>The question is: <br>Is it a normal behaviour? Because I
think=
that if the query is wrong, wouldn't be better to raise an error?<br>
<br><br><br>Regards,<br><br><br>Josep ****res<br><br>
------=_Part_23746_12147368.1207729218898--


|