7
 Followers
19
 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)
5 Dec 2017
Merged this idea with 'Advanced SQL Delete statement no output' (created on 2017-11-15 21:27:51 by Hanno)
15 Nov 2017

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
16 Nov 2017

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
17 Nov 2017

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
22 Nov 2017

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
23 Nov 2017

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
4 Dec 2017

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
5 Dec 2017

@Hanno: done, thanks for the heads up.

5 Dec 2017

No problem Kilian :)

7 Dec 2017

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
282
Followers
7