Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread dynamic parameter references not allowed
Mon, Jun 2 2014 10:11 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

This one seems a bit of a harsh restriction to me. Its easy enough to work round so I'm not to concerned but I thought I'd mention it for the next time Tim takes a breather.


SELECT
:Project , _fkContacts, _fkCompanies, _fkSites, _ID
FROM Career
WHERE
_fkJobCodes = 'CEO'
AND
_fkCompanies IN
(SELECT
DISTINCT (_fkCompanies)
FROM Calls
WHERE _fkProjects = :Project)

ElevateDB Error #700 An error was found in the statement at line 2 and column 1 (Invalid expression ? found, dynamic parameter references not allowed)

Roy Lambert

Mon, Jun 2 2014 10:14 AMPermanent Link

Matthew Jones

Roy Lambert wrote:

> SELECT
> :Project , _fkContacts, _fkCompanies, _fkSites, _ID
> FROM Career
> WHERE
> _fkJobCodes = 'CEO'
> AND
> _fkCompanies IN
> (SELECT
> DISTINCT (_fkCompanies)
> FROM Calls
> WHERE _fkProjects = :Project)

You want to have a dynamic field in the results? That is used in the
conditions too? Not sure how this would work as-is, the requirement
must be interesting.

--

Matthew Jones
Mon, Jun 2 2014 11:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Matthew


The workround is to build the string yourself - Tongueoject becomes 226 in both cases. I don't regard it as dynamic but a constant. If I was asking it to do a calculation or change for each row that would be different but all I'm doing is placing a constant in.

This is my non sql centric view <vbg>

Roy Lambert
Mon, Jun 2 2014 12:04 PMPermanent Link

Matthew Jones

But you have the :Project in the list of fields. From your explanation,
you want a field named 226...



> SELECT
> :Project , _fkContacts, _fkCompanies, _fkSites, _ID


--

Matthew Jones
Mon, Jun 2 2014 1:12 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Matthew

"Matthew Jones" <matthew@mattNOSP-AMhew-jones.com> wrote on Mon, 2 Jun 2014 12:04:02 -0400

>But you have the :Project in the list of fields. From your explanation,
>you want a field named 226...

No I want a constant 226. I can do

select 226 AS ProjectNumber from calls

but I can't do

select :Project AS ProjectNumber from calls

Roy Lambert
Tue, Jun 3 2014 4:03 AMPermanent Link

Matthew Jones

Roy Lambert wrote:

> No I want a constant 226. I can do
>
> select 226 AS ProjectNumber from calls

Okay, you haven't gone mad then. 8-)


--

Matthew Jones
Image