Dear Simon,
--------------------------------------------
From: Simon Slavin <[email protected]>
Sent:  Tue, 23 Sep 2014 00:29:32 +0100
To: General Discussion of SQLite Database <[email protected]>
Subject: Re: [sqlite] sqlite max arguments assistance
>
> 
>> On 23 Sep 2014, at 12:24am, Jungle Boogie <[email protected]> wrote:
>>
>> I did this:
>> sqlite> create table august
>> (MERCHANT_ID,DBA,WHITELABEL_ID,ORDER_ID,TRANSACTION_DISPLAY_DATE,TYPE,STATE,TRANSACTION_AMOUNT);
>> sqlite> .separator ","
>> sqlite> .import portalUseMonthly_20140901.csv august
>>
>> doing:
>> sqlite> .mode csv
>> sqlite> .import C:/work/somedata.csv tab
>> (with correct values)
>>
>> Results in .schema assuming everything as text
> 
> because you defined them as text yourself.  You need to put your column 
> affinities in the CREATE command.  Delete your existing table and try 
> something more like this:
> 
>> create table august
>> (MERCHANT_ID INTEGER, DBA TEXT, WHITELABEL_ID INTEGER, ORDER_ID INTEGER, 
>> TRANSACTION_DISPLAY_DATE TEXT, TYPE TEXT ,STATE TEXT, TRANSACTION_AMOUNT 
>> REAL);
> 

Works perfectly!
sqlite> select max(transaction_amount) from august;
66882.4

I'll have some reading and playing around!

Thanks so much for everyone's assistance on this armature problem of mine.

> Simon.
-- 
inum: 883510009027723
sip: [email protected]
xmpp: [email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to