Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | cplusplusAged Yak Warrior
 
 
                                        567 Posts | 
                                            
                                            |  Posted - 2012-10-20 : 09:52:21 
 |  
                                            | i use the following styleselect * from tbl_customerswhen i use teh same style select statement in another serevr, there it is not recognizing the table name, on the below way it is recognising, why is it? dbo. tablename enclosed with square bracket.select * from dbo.[tbl_customers]Thanks a lot for the helpful info. |  |  
                                    | robvolkMost Valuable Yak
 
 
                                    15732 Posts | 
                                        
                                          |  Posted - 2012-10-20 : 10:38:50 
 |  
                                          | Are you sure tbl_customers exists under the dbo schema? |  
                                          |  |  |  
                                    | cplusplusAged Yak Warrior
 
 
                                    567 Posts | 
                                        
                                          |  Posted - 2012-10-20 : 14:56:56 
 |  
                                          | Yes the table exists in the database, why it is only accepting with in square brackets.i have seen many servers.all i do is select * from tablenamebut here:select * from dbo.[tablename]with square bracket only it works.Thanks. |  
                                          |  |  |  
                                    | visakh16Very Important crosS Applying yaK Herder
 
 
                                    52326 Posts | 
                                        
                                          |  Posted - 2012-10-20 : 17:33:39 
 |  
                                          | quote:its not the square brackets that matters. I think important think is "dbo." part I guess other server your default schema is not dbo which is why it explicitly needs it to add dbo. prefix------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/Originally posted by cplusplus
 Yes the table exists in the database, why it is only accepting with in square brackets.i have seen many servers.all i do is select * from tablenamebut here:select * from dbo.[tablename]with square bracket only it works.Thanks.
 
 |  
                                          |  |  |  
                                |  |  |  |