On Friday, May 13, 2011 7:26:35 am John Fabiani wrote: > > > > John, > > > > > > > > SQLite is *very* different from other SQL databases in that it uses > > > > manifest typing > > > > (see http://sqlite.org/different.html) which can cause the effects > > > > you have been observing; > > > > I would assume that Dabo takes whatever SQLite reports as data type > > > > for fields and it goes from there. > > > > > > > > Cheers, > > > > Kai > > > > > > From what I have been reading I would agree. However, in this case the > > > datatype actually changes. And the fact that it changes is dependent > > > on the contents of the first record in the dataset I'm working with. > > > If the first record contains a Null the Dabo routine returns a text > > > (string) - if it's a date it returns dates. > > > > By default Sqlite treats all fields as strings. The presence of a Null > > seems to invoke the default behavior. You might want to give it a hint. > > So something like: > > > > first record > > mustenrollby = Null ::date > > referral = '2011-04-10'::date > > > > > This was completely unexpected and I believe it's a Dabo bug. I'm not > > > sure how to fix it but it needs fixing. > > > > > > Johnf >
> > I don't see how it can be fixed. If the routine requires that a record be > used to determine datatype then we are stuck with the results. Even if you > had the routine check 100 records they all could be null and the 101 record > contain a date. I didn't find any information_schema function for sqlite. > And the suggestion on PRAGMA Paul said would not work. Take a look at COALESCE: http://www.postgresql.org/docs/9.0/interactive/functions- conditional.html#AEN15541 Have Postgres return a dummy date whenever there is a NULL. > > Johnf > > -- Adrian Klaver [email protected] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
