SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
SQL Assistan V3 intellisense bugg

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
SQL Assistan V3 intellisense bugg
Author Message
Kirneh



Joined: 20 Nov 2007
Posts: 4

Post SQL Assistan V3 intellisense bugg Reply with quote
I Join two tabes like this (with automatik alias from sqlassistant):

SELECT TABLE1.NAMN FROM TABLE1 t INNER JOIN TABLE2 t2 ON .....

The problem is that the intellisense doesn't know what t1 or t2 is. It suggest Table2 and when a select the column "id" from the tables in the intellisense it just get like this...

SELECT TABLE1.NAMN FROM TABLE1 t INNER JOIN TABLE2 t2 ON id=id


(Sql Query analyser against SQL Server 2000)[/img]
Tue Nov 20, 2007 6:25 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Hi,

Your message is not very clear. I don't see "t1" reference in the SQL, and there is no screenshot demonstrating the problem. Please attach a screenshot.
Tue Nov 20, 2007 9:14 am View user's profile Send private message
Kirneh



Joined: 20 Nov 2007
Posts: 4

Post Reply with quote
Hello,

t1 should be t in the post above.
Here is a screenshot: (When i select ID from the box it just writes ID without the alias name for the table)


Tue Nov 20, 2007 1:29 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Is TABLE1 is an existing table or a table declared in the script?

The popup doesn't indicate that you have any foreign keys defined for that table so that there are no meaningful join suggestions and only general list of table and column names appear in the popup.

To see how it works with a JOIN, for example, try in Northwind database typing the following query
SELECT * FROM Customers c INNER JOIN Orders o ON ...

After you enter ON and hit space, you are going to get a popup with one line
o.CustomerID = c.CustomerID

In order for JOIN suggestions to work efficiently you should have proper referential integrity setup in the database. By the way, the results for JOINs are returned by the JOIN query whose syntax is available in SQL Assistant options and can be tweaked if needed. See the "DB Options" tab, "DB queries" option group.

Here is another tip, after you type JOIN and get a popup, expand the table in the popup that you want to join with and on the next level select which join to use. The rest of the query will be automatically completed for you and you don't need to type ON and the rest of the JOIN syntax.
Tue Nov 20, 2007 2:02 pm View user's profile Send private message
Kirneh



Joined: 20 Nov 2007
Posts: 4

Post Reply with quote
TABLE1 is a real table (i just created it to show an example)
Shouldn't it be better if it suggest t2 instead of TABLE1 in the box in the image i sent?
When i make a where condition it suggest t2 instead of TABLE1.
Wed Nov 21, 2007 5:47 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Oh, I see now what you are talking about. Yes, for consistency it should show an alias following by the table name the same way it does it in other places and also paste that alias along with the selected column name. I will make a note.
Wed Nov 21, 2007 9:26 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.