7
 Followers
18
 Likes

Make Output Structures on SQL Queries not mandatory

Aggregates & Queries
On our radar

It is frequent to use SQL Queries to perform operations like updates or deletes that do not require an output structure. For those cases we need to add a random structure as output to remove the error. My proposal is to make the output not mandatory.

Created on 18 Jul 2017
Comments (10)
Merged this idea with 'Advanced SQL Delete statement no output' (created on 2017-11-15 21:27:51 by Hanno)

It should not be required to define an output structure when my advanced query is only a DELETE FROM statement



Merged from 'Advanced SQL Delete statement no output' (idea created on 2017-11-15 21:27:51 by Hanno), on 2017-12-05 08:07:35 by Kilian Hekhuis

I think by default a DELETE statement returns the number of rows deleted, which might be why you need a output struct.



Merged from 'Advanced SQL Delete statement no output' (idea created on 2017-11-15 21:27:51 by Hanno), on 2017-12-05 08:07:35 by Kilian Hekhuis

It's not why you need the output structure, as you can specify any structure you want. It's more that the SQL parser is not smart enough to detect there's no SELECT in there.



Merged from 'Advanced SQL Delete statement no output' (idea created on 2017-11-15 21:27:51 by Hanno), on 2017-12-05 08:07:35 by Kilian Hekhuis

I guess the same would apply to an UPDATE-only statement. 

I concede that you might want to use the number of rows affected, but in that case, an output structure would be specified.



Merged from 'Advanced SQL Delete statement no output' (idea created on 2017-11-15 21:27:51 by Hanno), on 2017-12-05 08:07:35 by Kilian Hekhuis

Agreed, perhaps a warning could be added to say something like "This sql statement does not have any output structures defined."



Merged from 'Advanced SQL Delete statement no output' (idea created on 2017-11-15 21:27:51 by Hanno), on 2017-12-05 08:07:35 by Kilian Hekhuis

Just noticed that there was already an idea for this here

Moderators please can you merge the ideas.



Merged from 'Advanced SQL Delete statement no output' (idea created on 2017-11-15 21:27:51 by Hanno), on 2017-12-05 08:07:35 by Kilian Hekhuis

@Hanno: done, thanks for the heads up.

No problem Kilian :)

it affects the truechange, so I am against it.

however I agree with the "dummy" structure issue with non-query sql.

Not sure if a new element will be the solution..


views
477
Followers
7