Skip to main content
Closed

Mundane tasks helper tasks

Related products:Software Factory

The SF tries to help me in many ways to quickly get on with my work.

One area that still takes a lot of copy/paste or manual typing, is writing SQL. Either for templates of checking stuff on the database interactively. I get repetitively SQL insulted by typing - yet again - the full semantic key in a join of three tables somewhere at the bottom of the data model hierarchy.

Why is that? It is not because the SF does not know which columns I want to join; 97%
+/-3% of the time it is the full key that those tables share. The problem is that I can not tell the SF to write a query skeleton for me without me instructing the SF so via SQL.

What I want to do is:
  1. select four tables
  2. click the 'write join clause to clipboard' button
  3. paste the generated 'select t1.*, t2.*..tn* from t1 join t2 on available keys... tn on available keys' in the SQL editor of choice in the dialect configured for this project.
Of course I also like to have an insert- and update statement in the same manner, with all columns mentioned and defaults filled out (might be as comment).

The tasks could be made available in the data modeller. In that case the join-generator could take in account the references that one highlighted.
Show content
I may have a draft of half this functionality that works on the system tables of DB2 instead of on the SF.
Did this topic help you find an answer to your question?

7 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
If I could vote this multiple times, I would. This is a great idea!

Forum|alt.badge.img+3
  • Warrior
  • 63 replies
  • June 20, 2019
You have my vote. Automating repetitive tasks is exactly what we need. I like how you are actually insulted by writing repetitive SQL
But maybe it would be even better to have templated queries, where the SF is in control of part of the query (the joins) en the rest of the query is in the devs hands. This would mean you don't have to update your joins when the key structure changes

And that what Mark says 😉

Robert Jan de Nie
Thinkwise blogger
Forum|alt.badge.img+6
This, to me, feels not really software factory releated, but should be part of your IDE. Perhaps have a look at add-ins like this one: https://www.apexsql.com/sql-tools-complete.aspx

  • Author
  • 82 replies
  • June 20, 2019
Robert Jan de Nie wrote:
This, to me, feels not really software factory releated, but should be part of your IDE. Perhaps have a look at add-ins like this one: https://www.apexsql.com/sql-tools-complete.aspx


Close, but not quite. That one generates (amongst others) the snippets that the SF also (already) generates.

In browsing through their features, I did not see a reference to generating of join clauses based on a (written, for my part) selection of tables.

Are you familiar enough with the (SQLServer-specific) plugin to state whether something like that is available or not?

Robert Jan de Nie
Thinkwise blogger
Forum|alt.badge.img+6
Boudewijn wrote:

Are you familiar enough with the (SQLServer-specific) plugin to state whether something like that is available or not?


Nope, unfortunately not. But I do feel there is mileage in looking into these tools rather than trying to re-invent the wheel. Companies like Apex and Redgate do exist for a reason and their tools could be useful in helping us writing (SQL) code more quickly.

Jeroen van den Belt
Administrator
Forum|alt.badge.img+9

Unfortunately, this idea has not received enough votes. Because we want to keep the focus on ideas that are in high demand in our Community, we are closing this idea.


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
Updated idea status Open → Closed

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings