Comments
                          
                            Sort by recent activity
                          
                          
                        
                      
                      
                        The use case is writing a query with a CROSS APPLY where the function being applied outputs a column with the same name as a table that it's being applied against, e.g. something like:   <br>select p.partno, p.description, c.partno<br><br><div>from Parts p</div><div><br></div><div>cross apply dbo.get_children([cursor here, wanting "p.partno", but typing "pa(tab)" gives me "gc.partno"]) gc</div><div><br></div><div></div>  It is super-annoying that gc's partno is prompted in its own parameter list, above p's.   The original example just demonstrates the problem minimally.   Also, the editor continues to not post code properly, so here it is again, not in a code block:   select p.partno, p.description, c.partno from Parts p cross apply dbo.get_children([cursor here, wanting "p.partno", but typing "pa(tab)" gives me "gc.partno"]) gc 
   / comments
                        
                        
                        
                      
                      
                      
                  
                    The use case is writing a query with a CROSS APPLY where the function being applied outputs a column with the same name as a table that it's being applied against, e.g. something like:<br>select p....
                      
                    
                      
                        Also, there is apparently a bug in the forum software; the code is present when I edit my post, but it only displays "go"   Code below (not in a code block):   go create function dbo.foo (@x int) returns @foo table(x int) as begin     insert @foo(x) values (1)     return end go  select * from dbo.foo(x) f 
   / comments
                        
                        
                        
                      
                      
                      
                  
                    Also, there is apparently a bug in the forum software; the code is present when I edit my post, but it only displays "go"Code below (not in a code block):gocreate function dbo.foo (@x int)returns @...
                      
                    
                      
                        It should NOT qualify the x with [f], because [f] refers to the function being called, and it's impossible to use the function's output as its own input parameters.   P.S. tried the delete+enter trick, but no luck. 
  / comments
                        
                        
                        
                      
                      
                      
                  
                    It should NOT qualify the x with [f], because [f] refers to the function being called, and it's impossible to use the function's output as its own input parameters.P.S. tried the delete+enter trick...
                      
                    
                      
                        Column aliases in the form "x = [column name]" break the "All non-aggregated columns" group by functionality.  
For example, if you type this, and pick "All non-aggregated columns", you get "=" instead of "o.type_desc":
select t = o.type_desc, count(*)
from sys.objects o
group by 
 / comments
                        
                        
                        
                      
                      
                      
                  
                  
                Column aliases in the form "x = [column name]" break the "All non-aggregated columns" group by functionality.
For example, if you type this, and pick "All non-aggregated columns", you get "=" inste...
                      
                    