On Oct 13, 2008, at 2:59 PM, Mike wrote:

>
> Hi,
>
> I am trying to transfer some data from a sqlite database to an MS SQL
> database. I need to be able to pass null values for some of the empty
> columns in the row. For example, I have something like this for my
> row's format:
>
> date | id | reg | ot | hol
>
> The first two fields are required, but any or all of the last three
> can be null. How do I tell SqlAlchemy that I want those to be null?
> I've tried using None, an empty string, and the string
> "DEFAULT" (which works for pymssql for whatever reason).
>
> My class instantiation would look like this:
>
> TimeEntries(data, id, reg, ot, hol, *args)
>
> I am using the 0.5.0rc1 version of SqlAlchemy with Python 2.5.2 on
> Windows XP. Any hints would be appreciated.


None or leave the paramter out of the INSERT entirely will work.  Not  
sure about specific quirks in MS-SQL drivers though as far as your  
attempt of None not working, are you using pyodbc at least ?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to