My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 133: Different output in SQL Server Management Studios vs PyODBC
1 person starred this issue and may be notified of changes. Back to list
Status:  NoFix
Owner:  ----
Closed:  Nov 2010


 
Reported by chang...@gmail.com, Nov 9, 2010
What steps will reproduce the problem?
1. execute("sp_ScriptTable @TableName='Table', @NewTableName='dbo.Table'", con)

What is the expected output? What do you see instead?

Expected output (what i get if I execute the statement in SQL Server Management Studios):

CREATE TABLE dbo.table
(
 FactorId INT NOT NULL ,
 SubFactorId INT NOT NULL ,
 SubFactorWeight FLOAT NOT NULL ,
 StartDate DATETIME NOT NULL CONSTRAINT [DF_Table_StartDate] DEFAULT(((1900)/(1))/(1)),
 EndDate DATETIME NOT NULL CONSTRAINT [DF_Table_EndDate] DEFAULT(((3000)/(12))/(31))
,CONSTRAINT PK_RiskFactorTree_1 PRIMARY KEY  CLUSTERED (FactorId ASC,SubFactorId ASC,StartDate ASC)
)

Actual Output:

['CREATE TABLE dbo.Table',
 '(',
 '\nFactorId INT NOT NULL ,',
 '\nSubFactorId INT NOT NULL ,',
 '\nSubFactorWeight FLOAT NOT NULL ,',
 None,
 None,
 ',CONSTRAINT PK_Table_1 PRIMARY KEY  CLUSTERED (FactorId ASC,SubFactorId ASC,StartDate ASC)',
 ')']


What version of the product are you using? On what operating system?

PyODBC 2.1.5, Windows XP

Please provide any additional information below.

Not sure why the StartDate and EndDate become None in Python. Perhaps the slashes?

Nov 10, 2010
#1 chang...@gmail.com
Never mind. The issue was something really weird/subtle in the SQL code. Sorry >_<
Nov 20, 2010
Project Member #2 mkleehammer
(No comment was entered for this change.)
Status: Invalid
Nov 21, 2010
Project Member #3 mkleehammer
(No comment was entered for this change.)
Status: NoFix

Powered by Google Project Hosting