Select multiple join conditions at once

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
sebeto
Posts: 9
Joined: Tue 22 Apr 2014 03:19

Select multiple join conditions at once

Post by sebeto » Wed 23 Apr 2014 09:16

Hi,

I have some tables where the joins happen on many columns, for example:

Code: Select all

select *
from GEOINTERVAL as gi
	join GEODETAILS as gd
		on gi.HOLEID = gd.HOLEID
		and gi.PROJECTCODE = gd.PROJECTCODE
		and gi.GEOLFROM = gd.GEOLFROM
		and gi.GEOLTO = gd.GEOLTO
		and gi.PRIORITY = gd.PRIORITY
SQLComplete suggests the 5 conditions of the join, but I currently need to add them one by one:
  • select first suggestion (gi.HOLEID = gd.HOLEID) , TAB to insert it, type 'and' to get next suggestion
  • select second suggestion (gi.PROJECTCODE = gd.PROJECTCODE), TAB to insert it, type 'and' to get next suggestion
  • ...
Image

I was wondering, is there any way to select all suggested conditions rather than adding them one by one? Similar to the way I can select multiple columns when doing a select by checking check boxes, which would allow me to select the 5 conditions of my join and add them all at once?

This is what I mean by "select by checking check boxes", can this be somehow activated to select multiple suggested join conditions based on column names to add them together?

Image

alexa

Re: Select multiple join conditions at once

Post by alexa » Wed 23 Apr 2014 11:22

You can add such a suggestion on our UserVoice forum where other users can vote for it http://devart.uservoice.com/forums/87893-sql-complete

We collect and analyze the information from this forum in order to make a proper roadmap for future product releases.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: Select multiple join conditions at once

Post by .jp » Fri 25 Apr 2014 11:14

Please have a look at the following variant of the feature implementation that we have already discussed with our developer team:

Image

Will it satisfy your requirements?

sebeto
Posts: 9
Joined: Tue 22 Apr 2014 03:19

Re: Select multiple join conditions at once

Post by sebeto » Sun 27 Apr 2014 12:29

.jp wrote:Will it satisfy your requirements?
Hi JP, thank you for your reply. Yes, that's very good in my opinion! It will be a very useful feature when integrated.

Congratulations, you guys do a great job with SQL Complete, and I like how all forum questions get answered very quickly!

Post Reply