Prompt that uses session variables

Note the following:

  • The name of the prompt is specified using a lookup in the parameter map named PromptLabels. The key value is the session variable $language.
  • The Where clause is using a parameterized column.
select 
	ORDER_METHOD.ORDER_METHOD_CODE as ORDER_METHOD_CODE,
	ORDER_METHOD.ORDER_METHOD_#$language#
	as ORDER_METHOD_EN 
from 
	gosales.gosales.dbo.ORDER_METHOD ORDER_METHOD
#prompt($PromptLabels{$language},
	'',
	' ',
	'where ORDER_METHOD.ORDER_METHOD_' + $language + '
>'
)#