|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Strange Behavior w\ SQL Server Management StudioStudio. First, I am hitting a SQL Server 2000 box with no problem. I am running a script that runs in 10 seconds for all batches together and it is working fine in SS2000 QA. In SS Management Studio I can attempt to run the code (below the error messages) and I cancel the execution after more than a minute. Another problem with that is I have to take the GO statements out between batches or I get the error messages below (imediately below). Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near 'GO'. Msg 170, Level 15, State 1, Line 3 Line 3: Incorrect syntax near 'GO'. Msg 170, Level 15, State 1, Line 5 Line 5: Incorrect syntax near 'GO'. Call me crazy but I'm thinkin there's a bug here. -- 8 Seconds to complete independantly SELECT DISTINCT Vendor_TargetID, Vendor_Name, Vendor_Alias, Vendor_CostCenterLineItemFlag, Vendor_InvoiceEnabledFlag, Vendor_EffectiveDate, Vendor_ExpirationDate, Vendor_EmailAddress, Vendor_URL, Vendor_IntegrationType, Vendor_WorkflowStatusID, Vendor_SysTimeStamp, CONVERT(BIT,1) AS IsNew INTO ##VMG_VENDOR FROM GPOi_NEW.dbo.ESourcingVendorMap WITH (NOLOCK) WHERE Vendor_TargetID IS NOT NULL GO -- 1 second to complete independantly UPDATE ##VMG_VENDOR SET IsNew = 0 FROM GPOi_NEW.dbo.VMG_VENDOR A WHERE A.VENDOR_ID = Vendor_TargetID GO -- 1 second to complete independantly UPDATE GPOi_NEW.dbo.VMG_VENDOR SET VENDOR_ID = Vendor_TargetID, NAME = Vendor_Name, ALIAS = Vendor_Alias, COST_CENTER_AT_LINE_ITEM_FLAG = Vendor_CostCenterLineItemFlag, INVOICE_ENABLED_FLAG = Vendor_InvoiceEnabledFlag, EFFECTIVE_DATE = Vendor_EffectiveDate, EXPIRATION_DATE = Vendor_ExpirationDate, EMAIL_ADDRESS = Vendor_EmailAddress, URL = Vendor_URL, INTEGRATION_TYPE = Vendor_IntegrationType, WORKFLOW_STATUS_ID = Vendor_WorkflowStatusID, SYS_TIMESTAMP = Vendor_SysTimeStamp FROM ##VMG_VENDOR vv INNER JOIN GPOi_NEW.dbo.VMG_VENDOR v WITH (NOLOCK) ON vv.Vendor_TargetID = v.VENDOR_ID WHERE IsNew = 0 GO Try: Tools / Options / Query Execution+SQL Server+General, and inspect the
"Batch Separator" parameter; it may be set to something other than 'GO' Show quote "ZNICHTER" wrote: > Alright I am having a couple of strange problems with SQL Server Management > Studio. First, I am hitting a SQL Server 2000 box with no problem. I am > running a script that runs in 10 seconds for all batches together and it is > working fine in SS2000 QA. In SS Management Studio I can attempt to run the > code (below the error messages) and I cancel the execution after more than a > minute. Another problem with that is I have to take the GO statements out > between batches or I get the error messages below (imediately below). > > Msg 170, Level 15, State 1, Line 1 > Line 1: Incorrect syntax near 'GO'. > Msg 170, Level 15, State 1, Line 3 > Line 3: Incorrect syntax near 'GO'. > Msg 170, Level 15, State 1, Line 5 > Line 5: Incorrect syntax near 'GO'. > > Call me crazy but I'm thinkin there's a bug here. > > > -- 8 Seconds to complete independantly > SELECT > DISTINCT > Vendor_TargetID, > Vendor_Name, > Vendor_Alias, > Vendor_CostCenterLineItemFlag, > Vendor_InvoiceEnabledFlag, > Vendor_EffectiveDate, > Vendor_ExpirationDate, > Vendor_EmailAddress, > Vendor_URL, > Vendor_IntegrationType, > Vendor_WorkflowStatusID, > Vendor_SysTimeStamp, > CONVERT(BIT,1) AS IsNew > INTO ##VMG_VENDOR > FROM GPOi_NEW.dbo.ESourcingVendorMap WITH (NOLOCK) > WHERE Vendor_TargetID IS NOT NULL > GO > > -- 1 second to complete independantly > UPDATE ##VMG_VENDOR > SET IsNew = 0 > FROM GPOi_NEW.dbo.VMG_VENDOR A > WHERE A.VENDOR_ID = Vendor_TargetID > GO > > -- 1 second to complete independantly > UPDATE GPOi_NEW.dbo.VMG_VENDOR > SET > VENDOR_ID = Vendor_TargetID, > NAME = Vendor_Name, > ALIAS = Vendor_Alias, > COST_CENTER_AT_LINE_ITEM_FLAG = > Vendor_CostCenterLineItemFlag, > INVOICE_ENABLED_FLAG = > Vendor_InvoiceEnabledFlag, > EFFECTIVE_DATE = Vendor_EffectiveDate, > EXPIRATION_DATE = Vendor_ExpirationDate, > EMAIL_ADDRESS = Vendor_EmailAddress, > URL = Vendor_URL, > INTEGRATION_TYPE = Vendor_IntegrationType, > WORKFLOW_STATUS_ID = Vendor_WorkflowStatusID, > SYS_TIMESTAMP = Vendor_SysTimeStamp > FROM ##VMG_VENDOR vv INNER JOIN GPOi_NEW.dbo.VMG_VENDOR v WITH (NOLOCK) > ON vv.Vendor_TargetID = v.VENDOR_ID > WHERE IsNew = 0 > GO I had tried that before I posted with no luck.
Show quote "Richard Brown" wrote: > Try: Tools / Options / Query Execution+SQL Server+General, and inspect the > "Batch Separator" parameter; it may be set to something other than 'GO' > > "ZNICHTER" wrote: > > > Alright I am having a couple of strange problems with SQL Server Management > > Studio. First, I am hitting a SQL Server 2000 box with no problem. I am > > running a script that runs in 10 seconds for all batches together and it is > > working fine in SS2000 QA. In SS Management Studio I can attempt to run the > > code (below the error messages) and I cancel the execution after more than a > > minute. Another problem with that is I have to take the GO statements out > > between batches or I get the error messages below (imediately below). > > > > Msg 170, Level 15, State 1, Line 1 > > Line 1: Incorrect syntax near 'GO'. > > Msg 170, Level 15, State 1, Line 3 > > Line 3: Incorrect syntax near 'GO'. > > Msg 170, Level 15, State 1, Line 5 > > Line 5: Incorrect syntax near 'GO'. > > > > Call me crazy but I'm thinkin there's a bug here. > > > > > > -- 8 Seconds to complete independantly > > SELECT > > DISTINCT > > Vendor_TargetID, > > Vendor_Name, > > Vendor_Alias, > > Vendor_CostCenterLineItemFlag, > > Vendor_InvoiceEnabledFlag, > > Vendor_EffectiveDate, > > Vendor_ExpirationDate, > > Vendor_EmailAddress, > > Vendor_URL, > > Vendor_IntegrationType, > > Vendor_WorkflowStatusID, > > Vendor_SysTimeStamp, > > CONVERT(BIT,1) AS IsNew > > INTO ##VMG_VENDOR > > FROM GPOi_NEW.dbo.ESourcingVendorMap WITH (NOLOCK) > > WHERE Vendor_TargetID IS NOT NULL > > GO > > > > -- 1 second to complete independantly > > UPDATE ##VMG_VENDOR > > SET IsNew = 0 > > FROM GPOi_NEW.dbo.VMG_VENDOR A > > WHERE A.VENDOR_ID = Vendor_TargetID > > GO > > > > -- 1 second to complete independantly > > UPDATE GPOi_NEW.dbo.VMG_VENDOR > > SET > > VENDOR_ID = Vendor_TargetID, > > NAME = Vendor_Name, > > ALIAS = Vendor_Alias, > > COST_CENTER_AT_LINE_ITEM_FLAG = > > Vendor_CostCenterLineItemFlag, > > INVOICE_ENABLED_FLAG = > > Vendor_InvoiceEnabledFlag, > > EFFECTIVE_DATE = Vendor_EffectiveDate, > > EXPIRATION_DATE = Vendor_ExpirationDate, > > EMAIL_ADDRESS = Vendor_EmailAddress, > > URL = Vendor_URL, > > INTEGRATION_TYPE = Vendor_IntegrationType, > > WORKFLOW_STATUS_ID = Vendor_WorkflowStatusID, > > SYS_TIMESTAMP = Vendor_SysTimeStamp > > FROM ##VMG_VENDOR vv INNER JOIN GPOi_NEW.dbo.VMG_VENDOR v WITH (NOLOCK) > > ON vv.Vendor_TargetID = v.VENDOR_ID > > WHERE IsNew = 0 > > GO |
|||||||||||||||||||||||