if not exists(select * from sys.databases where name = 'BT')
    CREATE database BT;

IF EXISTS (SELECT * FROM BT.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'BTrecords')
    create table BT.BTrecords(
        btdate TEXT,
        positionList VARCHAR(255),
        cash VARCHAR(255),
        positionListValue VARCHAR(255),
        totalValue VARCHAR(255),
        strategyID VARCHAR(255) primary key
    );

Insert into BT.BTrecords (btdate,positionList,positionListValue,totalValue,strategyID) values ('2015-05-05',1,1,1,'3')

