jeronimus1980
Technical User
Dear Reader,
Hopefully somebody can help me with the following"
(Apologies already in advance for the poor explanation of the problem due to the fact that I am still pretty unfamiliar with the access/sql terminology.)
part of my script: (tonnes and X are already assigned)
Switch([x]>=10,[tonnes],
[x]<010,0) AS Process1,
Switch([x]>=5 And [x]<10,[tonnes],
[x]<5 And [x]>=10,0.0) AS process2,
Switch([x]<5,[tonnes],
[x]>=5,0) AS Process3,
Questions:
1> The "and" function is not working correctly, where is my mistake in formatting this function?
2> I use the numbers 5 and 10 to determine the used process. These number can/will change. These numbers are also stored in the table. Can I somehow use a link to the other column instead of the real number (like you easily can do in Excel)?
3> Is there a way to do this switch function shown above more efficiently as this function increases the query time (got lots of data).
Thank you for your time!
Jeronimus
Hopefully somebody can help me with the following"
(Apologies already in advance for the poor explanation of the problem due to the fact that I am still pretty unfamiliar with the access/sql terminology.)
part of my script: (tonnes and X are already assigned)
Switch([x]>=10,[tonnes],
[x]<010,0) AS Process1,
Switch([x]>=5 And [x]<10,[tonnes],
[x]<5 And [x]>=10,0.0) AS process2,
Switch([x]<5,[tonnes],
[x]>=5,0) AS Process3,
Questions:
1> The "and" function is not working correctly, where is my mistake in formatting this function?
2> I use the numbers 5 and 10 to determine the used process. These number can/will change. These numbers are also stored in the table. Can I somehow use a link to the other column instead of the real number (like you easily can do in Excel)?
3> Is there a way to do this switch function shown above more efficiently as this function increases the query time (got lots of data).
Thank you for your time!
Jeronimus