 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
brian_rassiner
Joined: 08 Jan 2008 Posts: 9
|
|
SQL Assistant 7.1.246 Professional - SELECT with JOIN |
|
When entering a SELECT query in SQL Server Management Studio query window and selecting a join from the dropdown window the JOIN table and the ON statement are on different lines... they used to be on the SAME line in previous versions of the product.
SELECT * FROM dbo.quotelob ql
JOIN dbo.transactionlob tl
ON ON tl.quotelob_id = ql.quotelob_id
What I want is
SELECT * FROM dbo.quotelob ql
JOIN dbo.transactionlob tl ON ON tl.quotelob_id = ql.quotelob_id
I have updated the SELECT in Code Formatting tab so when I hit the F11 key the code is formatted correctly. Is there another template to be updated so that the code is correctly formatted as above when selecting the JOIN table from the dropdown window.
;
|
|
Thu Feb 26, 2015 3:29 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
 |
 |
they used to be on the SAME line in previous versions of the product. |
I checked versions 6, and 5, and in the default setup all joins have conditions shown on a separate line, or actually lines, because there could be multiple conditions in the join , as in the below typical example after code is inserted by SQL Assistant.
 |
 |
SELECT *
FROM dbo.quotelob ql
JOIN dbo.transactionlob tl
ON tl.quotelob_id = ql.quotelob_id
AND tl.col_x = ql.col_X |
That's how the code would look like if you choose the condition in the popup displayed after the JOIN keyword, a 1 step selection of table and join condition
However, looking at your example, I think you used to do that operation in 2 steps, first selecting the joined table in the popup displayed after the JOIN keyword, then typing ON on the same line, getting second popup and then selected the condition. That 2 step procedure would have resulted in a single line "JOIN dbo.transactionlob tl ON ON tl.quotelob_id = ql.quotelob_id" Hope it explains the result.
|
|
Fri Feb 27, 2015 12:26 am |
|
 |
brian_rassiner
Joined: 08 Jan 2008 Posts: 9
|
|
|
|
The operation was always completed in a SINGLE step in the previous versions of the product. If I remember correctly there was a template under the OPTIONS that I was told to edit to get this to work or it might have been a configuration file... I just can not remember what it was. The 2 step approach is what I am now having to use but it is not very convenient. Any help in resolving this issue would be appreciated.
|
|
Fri Feb 27, 2015 1:44 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Did you have a separate JOIN formatting template by any chance?
|
|
Fri Feb 27, 2015 3:26 pm |
|
 |
brian_rassiner
Joined: 08 Jan 2008 Posts: 9
|
|
|
|
There might have been a separate JOIN formatting template but it was NOT created by me... all I remember was that it was something that I was asked to edit... had the ON statement on a separate line and I moved it to the same line as the JOIN statement.
|
|
Fri Feb 27, 2015 4:25 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|