-----Original Message-----
From: Bill Moran
Sent: Friday, September 02, 2011 10:53 AM
To: Bob Pawley
Cc: Postgresql
Subject: Re: [GENERAL] Variable column name
In response to "Bob Pawley" <rjpawley@shaw.ca>:
>
> I am getting an error -- "column "1" does not exist"
<snip>
> Select "1" into column ;
Where are you selecting "1" from? This query has no FROM clause, so of
course the column doesn't exist.
The previous query, "SELECT 2 INTO point_array" is going to put the
integer value 2 into the variable point_array, which I'm guessing is
not what you want either.
Well, actually that is what I am attempting.
I added the from clause and that seems to be acceptable for the column
identification.
What I am trying to accomplish is to collect distance information between
numerous geometries (in this case 8) at the first spatial location and build
an array in column 1, one array point at a time.
Then the loop moves to the next location, establishes the geometries and
updates the column 2 array with these distances.
It seems to work when I hard code the column name and array point, so I was
hoping to make it work through a loop using variables for column and array
point.
Does this make sense??
Bob