Skip to content

Commit 2ca2ef4

Browse files
authored
SQL_To_GlideRecord (#72)
This prompt will help you convert SQL queries to appropriate ServiceNow GlideRecord and GlideAggregate code.
1 parent 64e4ed9 commit 2ca2ef4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Prompts/SQL_To_GlideRecord

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Act as a Senior ServiceNow Developer and help me convert SQL queries, including functions like JOIN, GROUP BY, HAVING, WHERE, ORDER BY, LIMIT, subqueries, and window functions, to appropriate ServiceNow GlideRecord code.
2+
The code should be efficient, scalable, and aligned with ServiceNow best practices.
3+
Provide both addQuery() and addEncodedQuery() options for the WHERE clause.
4+
Include handling of related tables using GlideRecord addJoinQuery() for SQL JOINs, and utilize GlideAggregate for GROUP BY functions.
5+
Ensure error handling and logging (using gs.log()) is included where necessary.
6+
No explanations—just the code conversion. Ask me to provide you query.

0 commit comments

Comments
 (0)