hallo, i have the problem to make a calculation in an ZSQL Method, i would like to add the two floats like this. what i get is only a string adding! i get this if i give the numbers 1 and 100, i would like to get 101 SQL used: select * from RegionRef where ContainerId1 = 'c3b0fef5-4ab7fb9e-4abe43d4-7f149316' AND RegionRef.positionX >= 1 AND RegionRef.positionX <= 1100 any ideas if it is possible? this is my ZSQL Method: select * from RegionRef where ContainerId1 = <dtml-sqlvar ContainerId type=string> AND RegionRef.positionX >= <dtml-sqlvar Position1 type=float> AND RegionRef.positionX <= <dtml-sqlvar expr="Position1+Position3" type=float> thanks alex
Hello Atuc, Monday, November 4, 2002, 12:26:41 PM, you wrote: A> i have the problem to make a calculation in an ZSQL Method, i would like to A> add the two floats like this. what i get is only a string adding! A> i get this if i give the numbers 1 and 100, i would like to get 101 the problem is not in the way you do the calculation, your code is ok, but the fact that the passed in numbers are strings. in your ZSQL-method's argument-list, define them as floats like this: Position1:float Position2:float and it should work fine :) -- Geir Bækholt geir@funcom.com Tools/HCI-developer Tools/Billing - Product Operations Funcom Oslo
participants (2)
-
Atuc -
Geir Bækholt