Qualify Object names - changed schema

Refactors and formats SQL code.

Qualify Object names - changed schema

Postby tkdennis » Tue Jun 08, 2010 3:35 am

I applied the Qualify Object Names to a whole script, and it changed tables that already had schema names to use the dbo schema. It happened when I changed the USE <database> statement at the top of the script in order to get it to qualify the cross-database references. The other database had tables in the dbo schema.

Code: Select all
TRUNCATE TABLE dn.table1

to
Code: Select all
TRUNCATE TABLE dbo.table1


Thanks,
Traci
tkdennis
 
Posts: 75
Joined: Fri Feb 29, 2008 12:13 am

Postby Anu Deshpande » Wed Jun 09, 2010 12:56 pm

Many thanks for your post.

What happens when you remove the Use database statement and select the database which has table 'Table1' in 'dn' schema?
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 780
Joined: Mon Apr 20, 2009 2:53 pm
Location: Cambridge


Return to SQL Refactor Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest