casten unter PostgreSQL-8.1, Feldtyp cast von varchar nach float
am 21.05.2008 14:05:24 von Friedbert BauerThis is a multi-part message in MIME format.
------=_NextPart_000_0000_01C8BB4B.B19D3370
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0001_01C8BB4B.B19D3370"
------=_NextPart_001_0001_01C8BB4B.B19D3370
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hallo, ich dreh mich hier im Kreis.=20
=20
Problem: Cast von VARCHAR nach FLOAT
=20
Beim Umstieg von PostgreSQL-7 auf PostgreSQL-8 funktioniert folgendes =
nicht
mehr:=20
=20
=84Select ... ORDER BY FLOAT4(kt_laenge);=94
=20
Ein Ersetzen des obrigen Cast durch =84 (cast(kt_laenge as float4)) =93 =
klappt
leider auch nicht.
=20
Danke für Euere Tipps - Friedbert Bauer
------=_NextPart_001_0001_01C8BB4B.B19D3370
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Diso-8859-1">
style=3D'font-size:12.0pt;
font-family:"Courier New"'>Hallo, ich dreh mich hier im Kreis. =
style=3D'font-size:12.0pt;
font-family:"Courier New"'>
style=3D'font-size:12.0pt;
font-family:"Courier New"'>Problem: Cast von VARCHAR nach =
FLOAT
style=3D'font-size:12.0pt;
font-family:"Courier New"'>
style=3D'font-size:12.0pt;
font-family:"Courier New"'>Beim Umstieg von PostgreSQL-7 auf =
PostgreSQL-8 funktioniert
folgendes nicht mehr:
style=3D'font-size:12.0pt;
font-family:"Courier New"'>
lang=3DEN-GB
style=3D'font-size:12.0pt;font-family:"Courier New"'>„Select ... =
ORDER BY FLOAT4(kt_laenge);”
lang=3DEN-GB
style=3D'font-size:12.0pt;font-family:"Courier =
New"'>
style=3D'font-size:12.0pt;
font-family:"Courier New"'>Ein Ersetzen des obrigen Cast durch „ =
(cast(kt_laenge
as float4)) “ klappt leider auch =
nicht.
style=3D'font-size:12.0pt;
font-family:"Courier New"'>
style=3D'font-size:12.0pt;
font-family:"Courier New"'>Danke für Euere Tipps - Friedbert Bauer
------=_NextPart_001_0001_01C8BB4B.B19D3370--
------=_NextPart_000_0000_01C8BB4B.B19D3370
Content-Type: application/x-pkcs7-signature;
name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="smime.p7s"
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIISLjCCA58w
ggKHoAMCAQICASYwDQYJKoZIhvcNAQEFBQAwcTELMAkGA1UEBhMCREUxHDAa BgNVBAoTE0RldXRz
Y2hlIFRlbGVrb20gQUcxHzAdBgNVBAsTFlQtVGVsZVNlYyBUcnVzdCBDZW50 ZXIxIzAhBgNVBAMT
GkRldXRzY2hlIFRlbGVrb20gUm9vdCBDQSAyMB4XDTk5MDcwOTEyMTEwMFoX DTE5MDcwOTIzNTkw
MFowcTELMAkGA1UEBhMCREUxHDAaBgNVBAoTE0RldXRzY2hlIFRlbGVrb20g QUcxHzAdBgNVBAsT
FlQtVGVsZVNlYyBUcnVzdCBDZW50ZXIxIzAhBgNVBAMTGkRldXRzY2hlIFRl bGVrb20gUm9vdCBD
QSAyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqwujNeCLKRSx FIWvPBDkOW81XUqu
3ephjZVJ9G9koxpgZqSpQCKE2dSl5XiTDmgBrblNXDrO07ioQkDfz6O6gllq khusHJraCCslJ/lp
I0fx4Ossepv1EwLQfjR8wp48AFmr9doM9TI8K6xQ2tbD3oOUyqgMmTIOCEhW W2r72uFYWAFJX3JB
PBUGAY5draq4k7TNnuun6GotUjTbOu9cdVHa2/Mx+e5xmDLEVBVEDPmbVe2t 3xgIoKOGiknuUwWP
GUzV3lh5m9JqHEKrxdWnz2gPluThYZh2YciRfNY+AOKRUIfhnQrmrZfSHcY6 fcu82gM01Y5bA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