Jump to content
  • 0

Sql Error


theconav

Question

Hello all,

 

I ve been trying to solve this issue for quite so e time now:

 

Field : FieldOne --> Text

Fied  : FieldTwo --> Number

 

Field : Ttl --> Calculated

 

I have the following SQL in the calculated field:

 

SELECT Sum(FieldTwo) From tTable_Name WHERE tTable_Name_Field = '[@field:FieldOne]'

 

However I do not get nay results.

 

I have tried also the following alternative

 

SELECT Sum(FieldTwo) From tTable_Name WHERE tTable_Name_Field = [@field:FieldOne]

 

This gives me the sum of FieldTwo, however ignoring the criteria set by the WHERE.

 

If I try SELECT Sum(FieldTwo) From tTable_Name WHERE tTable_Name_Field = 'XXX' (i.e. passing a specific value instead of whatever value [@field:FieldOne] carries), then it works fine. 

 

Could someone help please ?

 

Thank you

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...