Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
9 subscribers
Views
5278 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Is there any way for me to write SQL queries in Appian? Meaning, could I literal
erickp
over 9 years ago
Is there any way for me to write SQL queries in Appian? Meaning, could I literally write select * from tableName in SAIL or using a smart service? I am in need of doing that. If this doesn't exist right now, will it be an option at a later release?
OriginalPostID-191713
OriginalPostID-191713
Discussion posts and replies are publicly visible
0
Eliot Gerson
Appian Employee
over 9 years ago
Please see
forum.appian.com/.../Query_Database_Smart_Service.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
erickp
over 9 years ago
Thanks Eliot!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
Elliot's suggestion won't work in SAIL which seems to have been your question. Why the "need" to write a select statement? In general you're best to use Appian's query rules or queryEntity function for database queries.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
erickp
over 9 years ago
I am trying to create dynamic rules. Been able to access the database, retrieve some SQL query from a table, execute it and do some validations in the UI with the results of that SQL query. This is why I need specifically to be able to run SQL
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
The problem with executing sql directly in SAIL is you'd struggle to restrict DDL type statements and also with re-evaluation there's an inherent danger of runaway statements. This is why Appian attempts to enforce such functions to be writers and use bind(). Your use case sounds interesting but I can't imagine it ever being possible in Appian to be honest.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
erickp
over 9 years ago
Makes sense. I might not need to use SQL directly in SAIL. I might be able to query the database from the process model, get the results and pass it to the user interface. Still need to put some more thought into this though
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
narasimhaadityac
A Score Level 2
over 9 years ago
Hi ericp, AFAIK wild card select (*) is not allowed, it will allow only the specific column names to be given.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel