node-sql-query icon indicating copy to clipboard operation
node-sql-query copied to clipboard

having in select clause

Open rumkin opened this issue 12 years ago • 2 comments

Having in select clause appends before WHERE clause that cause an synax error. And it inserts column name only, but it could be an expression too.

rumkin avatar Aug 19 '13 11:08 rumkin

Can you give an example or some more clarification?

Are you talking about an "in" clause in a where clause like below?

SELECT * FROM table WHERE table_column in (1,2,3,4,5,6);

kcphysics avatar Feb 20 '14 20:02 kcphysics

I mean HEAVING keyword. Look at lines 237 and 343 in lib/Select.js. You just escape it as sql ID and then just insert into query. But heaving syntax has more options.

rumkin avatar Feb 24 '14 11:02 rumkin