Using parameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to enter a range in the criteria box? For example WE 051405 -
WE 052105. What I would like to do is enter a criteria of [enter desired
periods] then when prompted the users types WE 051405 - WE 052105.

Thanks,
Anthony
 
That did it. Thanks!

Ofer said:
the right syntax to enter a range is between

Where Field between [Param1] and [Param2].
But you might have some problem whan you try to get a range betweem two text
fields. Its more accurate when you use it for numbers and dates

anthonysjo said:
Is it possible to enter a range in the criteria box? For example WE 051405 -
WE 052105. What I would like to do is enter a criteria of [enter desired
periods] then when prompted the users types WE 051405 - WE 052105.

Thanks,
Anthony
 
Anthony,

Although Ofer provided an answer that works, another alternative (if the 'WE
0' part is a constant feature of these values) is to use the right() function
as in:

where val (right(fieldX, 5)) between 51405 and 52105

The right() returns a string consisting of the rightmost 5 characters (the
numeric part of your field value). The val() converts this string to a
numeric. As Ofer points out, between ... and may not produce the desired or
expected result on text strings. This alternative avoids the issue.

--
Chaim


anthonysjo said:
That did it. Thanks!

Ofer said:
the right syntax to enter a range is between

Where Field between [Param1] and [Param2].
But you might have some problem whan you try to get a range betweem two text
fields. Its more accurate when you use it for numbers and dates

anthonysjo said:
Is it possible to enter a range in the criteria box? For example WE 051405 -
WE 052105. What I would like to do is enter a criteria of [enter desired
periods] then when prompted the users types WE 051405 - WE 052105.

Thanks,
Anthony
 
Good post!!! Thanks!!

Chaim said:
Anthony,

Although Ofer provided an answer that works, another alternative (if the 'WE
0' part is a constant feature of these values) is to use the right() function
as in:

where val (right(fieldX, 5)) between 51405 and 52105

The right() returns a string consisting of the rightmost 5 characters (the
numeric part of your field value). The val() converts this string to a
numeric. As Ofer points out, between ... and may not produce the desired or
expected result on text strings. This alternative avoids the issue.

--
Chaim


anthonysjo said:
That did it. Thanks!

Ofer said:
the right syntax to enter a range is between

Where Field between [Param1] and [Param2].
But you might have some problem whan you try to get a range betweem two text
fields. Its more accurate when you use it for numbers and dates

:

Is it possible to enter a range in the criteria box? For example WE 051405 -
WE 052105. What I would like to do is enter a criteria of [enter desired
periods] then when prompted the users types WE 051405 - WE 052105.

Thanks,
Anthony
 
Back
Top