string function

This is a multi-part message in MIME format.

------=_NextPart_000_00F8_01C82C2C.EB75FAE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi All,
Having a little issue, and can't seem to figure it out!


Every time I try to run this select command I get this error:

select left(kd_aln,2) as code from airlin

the error msg is : function left(character varying, integer) does not =
exist

How to resolve this problem

Thank for your attention

Regards

Nyoman/Bali

------=_NextPart_000_00F8_01C82C2C.EB75FAE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3132" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi All,</FONT></DIV>
<DIV>
<P dir=3Dltr><FONT face=3DArial><SPAN lang=3Den-us>Having a little =
issue, and
can</SPAN><SPAN lang=3Den-us>=92</SPAN><SPAN lang=3Den-us>t seem to =
figure it
out!</SPAN></FONT></P>
<P dir=3Dltr><SPAN lang=3Den-us><FONT face=3DArial></FONT></SPAN></P>
<P dir=3Dltr><FONT face=3DArial><SPAN lang=3Den-us>Every time I try =
to</SPAN><SPAN
lang=3Den-us> run this select command I get this =
error:</SPAN></FONT></P>
<P dir=3Dltr><SPAN lang=3Den-us>select left(kd_aln,2) as code from =
airlin</SPAN></P>
<P dir=3Dltr><SPAN lang=3Den-us>the error msg is : function =
left(character varying,
integer) does not exist</SPAN></P>
<P dir=3Dltr><SPAN lang=3Den-us>How to resolve this problem</SPAN></P>
<P dir=3Dltr><SPAN lang=3Den-us><FONT face=3DArial size=3D2>Thank for =
your
attention</FONT></SPAN></P>
<P dir=3Dltr><SPAN lang=3Den-us><FONT face=3DArial =
size=3D2>Regards</FONT></SPAN></P>
<P dir=3Dltr><SPAN lang=3Den-us><FONT face=3DArial
size=3D2>Nyoman/Bali</FONT></SPAN></P></DIV></BODY></HTML>

------=_NextPart_000_00F8_01C82C2C.EB75FAE0--
gunartha.nyoman [ Mi, 21 November 2007 19:54 ] [ ID #1875777 ]

Re: [ODBC] string function

This is a multi-part message in MIME format.

------=_NextPart_000_00CB_01C82C48.C60430D0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Hi,



I don't believe the LEFT function exists (at least by default).



Try this instead:

select SUBSTR(kd_aln,LENGTH(kd_aln) - 1, 2) as code from airlin



Also, please don't cross-post. This isn't an ODBC question. You're more
likely to get useful answers posting once to the correct list.



Cheers,

~p





THINK BEFORE YOU PRINT - Save paper if you don't really need to print this

*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee. If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments
e-mail.

------=_NextPart_000_00CB_01C82C48.C60430D0
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{font-family:Arial;
color:navy;}
[at] page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body bgcolor=3Dwhite lang=3DEN-AU link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Hi,</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>I don’t believe the LEFT =
function
exists (at least by default).</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Try this instead:</span></font></p>

<p class=3DMsoNormal style=3D'text-indent:5.25pt'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>sele ct
SUBSTR(kd_aln,LENGTH(kd_aln) - 1, 2) as code from =
airlin</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Also, please don’t =
cross-post. This
isn’t an ODBC question. You’re more likely to get useful =
answers
posting once to the correct list.</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Cheers,</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>~p</span></font></p>

<div style=3D'border:none;border-left:solid blue 1.5pt;padding:0cm 0cm =
0cm 4.0pt'>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>

</div>

</div>


<br>=
<p>=0ATHINK BEFORE YOU PRINT - Save paper if you don't really need to print t=
his e-mail.=0A<p>=0A<b>*******************Confidentiality and Privilege Notice**=
*****************</b>=0A<p>=0AThe material contained in this message is privileg=
ed and confidential to=0Athe addressee. If you are not the addressee indicate=
d in this message or=0Aresponsible for delivery of the message to such person,=
you may not copy=0Aor deliver this message to anyone, and you should destroy =
it and kindly=0Anotify the sender by reply email.=0A<p>=0AInformation in this mess=
age that does not relate to the official business=0Aof Weatherbeeta must be tr=
eated as neither given nor endorsed by Weatherbeeta.=0AWeatherbeeta, its emplo=
yees, contractors or associates shall not be liable=0Afor direct, indirect or =
consequential loss arising from transmission of this=0Amessage or any attachme=
nts=0A
<br>=
</body>

</html>

------=_NextPart_000_00CB_01C82C48.C60430D0--
Phillip Smith [ Mi, 21 November 2007 04:14 ] [ ID #1875778 ]
Datenbanken » gmane.comp.db.postgresql.odbc » string function

Vorheriges Thema: odbc varchar/longvarchar default setting
Nächstes Thema: Out of memory while reading tuples