Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

IF table exists, DROP TABLE then CREATE TABLE - script not working Expand / Collapse
Author
Message
Posted Monday, November 4, 2013 9:24 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Friday, September 19, 2014 3:37 AM
Points: 708, Visits: 3,288
Sorry! I have updated my previous comment which explains the changes that I made!

---------------------------------------------------------


It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
David Edwards - Media lens

Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
Howard Zinn
Post #1511166
Posted Tuesday, November 5, 2013 4:55 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 5:49 AM
Points: 907, Visits: 2,870
Abu Dina (11/4/2013)
You don't need to include the schema name when you call the OBJECT_ID function:

OBJECT_ID(N'dbo.mtzcus_2014_CoreMenuAuditDetails', N'U')

should be just

OBJECT_ID(N'mtzcus_2014_CoreMenuAuditDetails', N'U')


That's incorrect. You should include the schema name when you call the OBJECT_ID function although you don't have to.




The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1511435
Posted Tuesday, November 5, 2013 4:57 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 5:49 AM
Points: 907, Visits: 2,870
jhager (11/4/2013)
Other than missing the END statement (which exists later on in my script), I'm still not seeing anything incorrect.

The code works for me. The table is created correctly.




The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1511437
Posted Tuesday, November 5, 2013 8:19 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, August 8, 2014 6:54 AM
Points: 58, Visits: 239
I think I found the problem -- I was running the script in one session, then checking the results in another.

~ Jeff
Post #1511502
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse