VARCHAR to INTEGER conversion

From: Darren Ferguson <darren(at)crystalballinc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: VARCHAR to INTEGER conversion
Date: 2002-01-16 23:56:40
Message-ID: Pine.LNX.4.10.10201161852270.30914-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello list

I have a stored procedure that takes in an integer

sp_customer_service_property_descr(INTEGER)

However i have a database field that is a VARCHAR because it can take
either a number that would have to go into this stored procedure or it can
just have normal text depending on the value of another field.

I tried casting the VARCHAR as an INTEGER postgres (V7.2b4) doesn't let me
do this. Now i understand why it is not letting me do this however here is
my question

Does anyone know of a work around so that i can call this function with
the varchar database field.

Thanks in advance

Darren Ferguson

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Brown-Bayliss 2002-01-17 00:06:17 external input for primary key
Previous Message Joseph Shraibman 2002-01-16 22:09:59 Re: large number of files open...