| Author | 
		Message | 
	
	
		
			maxpesola 
			 
			
  
			
			
				Joined: 26 Nov 2007 Posts: 51
  | 
			 
			  
		 | 
		
			
				  Tables and aliases | 
				     | 
			 
			
				With sql server 2005, when i use a table's alias with the word "AS" like this:
 
-    tablename AS aliasname
 
sqla 6.0.33 no longer recognizes the columns without the aliasname before, if pass the mouse over it does not display the pop-up detail, but if i remove the word "AS" like this:
 
-    tablename aliasname
 
it resume operation.
 
  Last edited by maxpesola on Tue Jul 12, 2011 5:03 am; edited 1 time in total | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 4:18 am | 
		          | 
	
	
		  | 
	
	
		
			gemisigo 
			 
			
  
			
			
				Joined: 11 Mar 2010 Posts: 2175
  | 
			 
			  
		 | 
		
			
				  [SA 6 Beta] - No hover-over info for subquery columns | 
				     | 
			 
			
				It does work for me. However, it does not for columns sq.id_table2 and sq.valami_mas when selecting from a subquery joined to a table like this:
 
	  | 
	
 
	  | 
	
 
SELECT 
 
   t1.id_table1
 
   ,t1.valami
 
   ,sq.id_table2
 
   ,sq.valami_mas
 
FROM 
 
   dbo.table1 AS t1
 
   INNER JOIN
 
   (
 
      SELECT 
 
         t2.id_table2
 
         ,t2.valami_mas
 
         ,t2.id_table1
 
      FROM 
 
         dbo.table2 AS t2
 
   ) AS sq
 
      ON   sq.id_table1 = t1.id_table1
 
 | 
	 
 
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 4:49 am | 
		          | 
	
	
		  | 
	
	
		
			maxpesola 
			 
			
  
			
			
				Joined: 26 Nov 2007 Posts: 51
  | 
			 
			  
		 | 
		
			
				  Re: [SA 6 Beta] - No hover-over info for subquery columns | 
				     | 
			 
			
				Try to not use the alias before the columnname in a simple query like this:
 
	  | 
	
 
	  | 
	SELECT * FROM tablename AS b
 
WHERE columname=1 | 
	 
 
 
The columname does not have the popup.
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 5:13 am | 
		          | 
	
	
		  | 
	
	
		
			gemisigo 
			 
			
  
			
			
				Joined: 11 Mar 2010 Posts: 2175
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				I've misread that you were not using the aliasname.columname format, sorry. It really does not work when omitting the alias name. When joining tables and selecting (wherring:) columns that are present in some of the tables with the same name, that column name would be ambiguous, but then again, it could work with simple queries.
 
 
The hover-over popup for subquery columns does not work at all, regardless of the alias name and/or the AS keyword being present or not. The popup that shows when typing the names does contain the info, though.
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 5:34 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7991
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				
	  | 
	
 
	  | 
	With sql server 2005, when i use a table's alias with the word "AS" like this: 
 
- tablename AS aliasname 
 
sqla 6.0.33 no longer recognizes the columns without the aliasname before, if pass the mouse over it does not display the pop-up detail, but if i remove the word "AS" like this: 
 
- tablename aliasname 
 
it resume operation. | 
	 
 
 
 
Thank you very much for your feedback. I have logged this bug to your tracking system, ticket #SA0014915
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 8:09 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7991
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				
	  | 
	
 
	  | 
	No hover-over info for subquery columns | 
	 
 
 
 
In the current version, SQL Assistant is able to figure out column names from a subquery, but doesn't know their data types. For regular table and view columns it queries system catalog tables (see Columns query in the Options, on DB queries tab). For subquery based columns that method doesn't work and that's why data type hint is not displayed on mouse over subquery columns.
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 8:13 am | 
		          | 
	
	
		  | 
	
	
		
			gemisigo 
			 
			
  
			
			
				Joined: 11 Mar 2010 Posts: 2175
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				
	  | 
	
 
	  | 
	
	  | 
	
 
	  | 
	No hover-over info for subquery columns | 
	 
 
 
 
In the current version, SQL Assistant is able to figure out column names from a subquery, but doesn't know their data types. For regular table and view columns it queries system catalog tables (see Columns query in the Options, on DB queries tab). For subquery based columns that method doesn't work and that's why data type hint is not displayed on mouse over subquery columns. | 
	 
 
 
 
What about the info shown in the popup for selecting the columns? Where does it come from? Though there are no indication about keys or uniqueness, the popup clearly shows types for columns from sq subquery.
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 8:27 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7991
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				That's a good question, which I'm unable to asnwer. I will have to forward your questions to our develeopment team.
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 8:45 am | 
		          | 
	
	
		  | 
	
	
		
			maxpesola 
			 
			
  
			
			
				Joined: 26 Nov 2007 Posts: 51
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				Also , if i add the WITH(NOLOCK) after the tablename  the popup of colums does not work, like this simple query:
 
	  | 
	
 
	  | 
	SELECT * FROM tablename b WITH(NOLOCK)
 
WHERE b.columname=1 | 
	 
 
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 10:02 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7991
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				Thank you. I have logged that too.
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 12:42 pm | 
		          | 
	
	
		  | 
	
	
		
			gemisigo 
			 
			
  
			
			
				Joined: 11 Mar 2010 Posts: 2175
  | 
			 
			  
		 | 
		
			
				   | 
				     | 
			 
			
				
	  | 
	
 
	  | 
	That's a good question, which I'm unable to asnwer. I will have to forward your questions to our develeopment team. | 
	 
 
 
Thank you very much.
  | 
			 
		  | 
	
	
		| Tue Jul 12, 2011 1:19 pm | 
		          | 
	
	
		  | 
	
	
		 |