Variables used in the Where Clause of a Database View.

rgthomas
Tera Contributor

Is it possible to use a variable in the where clause when creating a database view?

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Hi @rgthomas 

it's not clear what you mean with "variable" but no, it's not possible. You are only allowed to use existing column names for the related tables.

Maik

Danish Bhairag2
Tera Sage
Tera Sage

Hi @rgthomas ,

 

As maik mentioned no

ServiceNow does not directly support the use of variables in the WHERE clause when creating a database view. The SQL query for a database view in ServiceNow is typically static and predefined.

 

Thanks,

Danish

 

Ankur Bawiskar
Tera Patron
Tera Patron

@rgthomas 

what's your business requirement?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader