Thanks for you all. I don't know if [char](32) is valid standard SQL or not. But the MS use this type in SQLServer2000(and above?). The SQL statements that I used to create tables in SQLite3 was auto generated by my SQLServer2000 EnterpriseManager. And SQLite3 did not report any error about this. It likes a trap for me. What ever, I have reported this as a bug in www.sqlite.org, and, I will also choose my columnnames carefully the next time :) ----- Original Message ----- From: "Kees Nuyt" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Friday, March 23, 2007 4:55 AM Subject: Re: [sqlite] data type problem
> On Tue, 20 Mar 2007 13:24:17 +0800, you wrote: > >>if you create a table use following statement (script generated from MS SQL >>Server 2000) >>CREATE TABLE [XTollData] ( >> [DutyID] [char] (32) NOT NULL , >> [CarNumber] [char] (10) NULL >>); >> >>SQLite3_Column_decltype will treat DutyID as data type 'char' but not >>'char(32)' > > I don't think [char] (32) in > [DutyID] [char] (32) NOT NULL , > is valid SQL. Keywords can be quoted with "" or [] to be able to > use them as identifiers (i.e. objectnames), but IMHO keywords > that have to stay keywords shouldn't be quoted at all. > > If you choose your columnnames carefully (not contained in the > collection of reserved words), the [] could easily be filtered > out with sed or awk. > -- > ( Kees Nuyt > ) > c[_] > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > >