I know got this far thanks to Pavle Stehule. The function worked and returned
the data when the variables was predefined after "return query".
When tried to replace these with variables passed through the function call
I got this message;
ERROR: syntax error at or near "RETURN"
LINE 1: ...ll sele
A short brief about the goal:
I have a Excel workbook loaded with static data and need to compare these to
"live-data" from DB. There are 20 rows with data in the report that needs to
be retrieved from the database, and almost the same amount of queries, since
all of these queries relies on variabl
I solved this one by trial and error. You were right I needed brackets to
indicate an array, but also needed to replace "in ($4)" with "= any ($4)"
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Issue-with-a-variable-in-a-function-tp4974235p4977361.html
Sent from the Pos
18:28
To: Lund, Thomas
Subject: Re: Issue with a variable in a function
-Original Message-
From: [hidden email]
[mailto:[hidden email]]
On Behalf Of tlund79
Sent: Tuesday, November 08, 2011 8:17 AM
To: [hidden email]
Subject: [SQL] Issue with a variable in a function
The issue relates
I've created a function which purpose is to import data to an excel report.
This is however the first time I'm doing this, and I've exhausted all other
options before asking the question here.
I call this function with this command: select ppr_data(2011,1,52,8)
The issue relates to the variable "
Hi,
Firstly; I'm not a developer, but a business developer and statistics guy.
This means that I'm happy using "basic" selects to gather information for
analysis.
One thing that could really efficiate my work is using variables, let's say
I have a table with different orders;
|customer_id|produc