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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Enterprise manager adding aliases to queries

Author  Topic 

pauwr
Starting Member

3 Posts

Posted - 2009-01-28 : 08:59:45
Hi,

In enterprise manager, if I right-click on a table and choose Open Table -> Return All Rows and then click to show the SQL pane, it shows the details SQL statement as "SELECT * FROM my_table my_table".

If I paste an SQL statement into the pane, for example "SELECT my_col FROM my_table" and then click Execute, it changes the statement to read "SELECT my_col FROM my_table my_table1".

Does anyone know why this happens and how to stop it from happening?

It only seems to happen on 1 database on the server and it never used to happen with the database was first setup. I'm not sure what would have changed to cause it.

Thanks,

Paul

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-30 : 01:06:45
This happens normally and why are you trying to execute that statement "SELECT my_col FROM my_table my_table1"??

:)

Avantha Siriwardana
Go to Top of Page

pauwr
Starting Member

3 Posts

Posted - 2009-01-30 : 03:55:51
I'm trying to execute "SELECT my_col FROM my_table" but enterprise manager changes the statement to "SELECT my_col FROM my_table my_table1". It's adding a table alias called my_table1 when there is no need to add an alias.

This only happens on 1 database on the server. It doesn't happen on the other 20 or 30 databases on that server or any of the ones on our other servers, so it's not normal behaviour
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-30 : 03:57:30
are you using SQL 200 or higher version?

Avantha Siriwardana
Go to Top of Page

pauwr
Starting Member

3 Posts

Posted - 2009-01-30 : 04:02:13
Its SQL 2000
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-30 : 04:22:48
I tried to implement what you said and it did not give me such a thing.
:(

Avantha Siriwardana
Go to Top of Page
   

- Advertisement -