This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - JS & SQL Statements

aaasam - Monday, December 12, 2011 2:44 PM:

Does someone happen to have an example of how they coded a complete SQL Select statement within JavaScript I could see?

I have several years of SQL/DB2, but JS is not my strong suite.

Plus, does anyone know how to write an SQL Select Statment in JS that will allow for me to do something like:

Select column X (which will have multiple values), get its summarized count, with a sort & group by on that same column?

I coded a statement: setAttribute ("select", "count(*) as total, column-name");

The syntax checker is dying on the comma saying it is expecting a ")" ??

Thanks!



aaasam - Monday, December 12, 2011 5:45 PM:

Never mind everyone.

Figured out my JS coding error and now executing the SQL and returning data.

Though, the SQL "sort by" and "group by" does not seem to be in the acceptable format for use by the setProperty within aras.

Any ideas on this one?