cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted search : Enter value

Former Member
0 Kudos

again i have a problem with a formated search.

based on this easy sample

SELECT T0.CardCode FROM OCRD T0 WHERE T0.CardCode = <u><b>N'[%0]'</b></u>

i want the user to enter a value, but there is no chance to put the parameter (%..)into the where clause.

Background : I want the User to enter a value in the field price (ITM1). But the entered value must be calculated before storing. So I want to calculate it with a formated search. Example : He enters 105 Euro , but this is the price for 1000 items. The 105 Euro must be divided by 1000, then multiply with "Oitm.SalPackUn". The result (of my formatted search) will be displayed (an stored).

Possible ???

Additional question : Is there a documentation for formatted searches, especially things round parameters an so on ?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

former_member204969
Active Contributor
0 Kudos

In long queries the SBO can't properly manage parameters.But you can declare SQL variable and store the parameter value into it.

/SELECT FROM [dbo].[VPM1] T0/

declare @fromdate as datetime

/* WHERE */

set @fromdate = /* T0.DueDate */ '[%0]'

See note 730960.

Answers (0)