Skip site navigation (1) Skip section navigation (2)

need some help with pl-pgsql

From: justin <justin(at)emproshunts(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: need some help with pl-pgsql
Date: 2008-12-23 21:04:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
have a function written in pgsql   it runs just fine, except its doing
something really stupid.

The function runs just fine till this select statement

Select (wo_wipvalue/wo_qtyord)
         into _TotalCost
         from wo
         where wo_id = pWoid ;

This goes to the work order header table to gets the current value
divided by current qty thats been completed so far, then sticks the
value into _TotalCost variable based on the parameter passed into
variable pWoid.

problem is it returns NULL  which is impossible as i can manually run
the select statement and get the $1.589445

I have no idea how to fix this problem going forward???

and the database is 8.3.5 running Ubuntu 8.0 lts


pgsql-general by date

Next:From: Karsten HilbertDate: 2008-12-23 21:24:14
Subject: encoding of PostgreSQL messages
Previous:From: Dimitris SakellariosDate: 2008-12-23 19:30:41
Subject: Re: Question about pattern matching

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group