В роботі

CSV file importer for MS SQL in C#

I need to parse and import a .csv file to a MS SQL database. Here is a sample of the .CSV file:

Symbol,Date,Open,High,Low,Close,Volume

AACC,15-Jan-13,4.53,4.56,4.5,4.53,23600

AAIT,15-Jan-13,28.35,28.57,27.94,28.25,4900

AAME,15-Jan-13,3.25,3.3,3.23,3.25,3700

AAON,15-Jan-13,22.5,22.75,22.21,22.31,33300

AAPL,15-Jan-13,498.3,498.99,483.38,485.92,31313200

AAWW,15-Jan-13,43.96,44.24,42.73,43.36,345800

So the first row contains the headers, and the next the data. The columns are always the same, they don't change from one file to the next. I need to have a program that will take the files and import them in an SQL database. The requirements are as follows:

1) There must be a table per unique symbol. In this case one for AACC, one for AAIT, one for AAME, etc. If the program sees a symbol for which a table doesn't exist, it must create the [url removed, login to view], if there already is a table for that symbol only an insert is necessary.

2) The format for each table is as follows:

CREATE TABLE [dbo].[AAPL](

[Symbol] [varchar](20) NOT NULL,

[Index] [bigint] NOT NULL,

[Open] [float] NOT NULL,

[High] [float] NOT NULL,

[Low] [float] NOT NULL,

[Close] [float] NOT NULL

) ON [PRIMARY]

3) The column INDEX is derived from Date. Here is the code I'm using now:

DateTime dt = [url removed, login to view](csv[DATEFIELD])

static int ConvertDateToBarNumber(DateTime dt)

{

/*

* Defines a unique index for each minute, starting on 2000/1/1 00:00

*/

return ([url removed, login to view] - 2000) * 525949 + [url removed, login to view] * 43829 + [url removed, login to view] * 1440 + [url removed, login to view] * 60 + [url removed, login to view];

}

This is basically the number of minutes elapsed since 1/1/2000

4) This should be a console application, not windows forms. I would like to specify only the folder where the .csv files are located, and the program will automatically process all .csv files in the folder. I would also like to have an option to DELETE the file after it is processed.

Навички: Програмування на C#, SQL

Показати більше: t sql programming, programming symbol, programming sql, parse programming, high volume database, float programming, float c programming, c programming static, c for int, aaon, t-sql in, sql programming, sql c, sql and c, MS SQL, DT, csv file, console sql, console c, c# console, sharp hour, csv column format, return file, csv convert, convert sql database

Про роботодавця:
( 28 відгуки(-ів) ) Miami, United States

ID проекту: #4271119

Доручено:

dvfabia

Hi! I am interested in your project and like to help you out. Got the .NET, MSSQL and stock trading skills to do the work. Looking forward to hear from you!

$30 USD за 3 дні(-в)
(93 відгуків(-и))
5.5

44 фрілансерів(-а) подали заявки на цю роботу; середня заявка - $72

CodeAmbassador

Hi, I'd like to help you on this. It looks pretty straightforward, although I do have some minor questions that we can clarify upon bid acceptance. I look forward to working with you! regards, Johnny

$125 USD за 2 дні(-в)
(23 відгуків(-и))
6.3
barundebnath

Hi, Very easy job. Please see private message for my proposal. Thanks

$100 USD за 2 дні(-в)
(57 відгуків(-и))
6.1
ehsankayani

HI, Kindly see details in PMB Thank you

$150 USD за 1 день
(20 відгуків(-и))
5.6
thanhlongfree

Very Simple project. Please check PM

$40 USD за 0 дні(-в)
(21 відгуків(-и))
5.2
slavisatosic

Hello, I am offering you to make this C# application by tomorrow. Please, see private message for details.

$80 USD за 1 день
(28 відгуків(-и))
5.2
vano101

Hello. I've done one similar project several months ago. I'm able to complete your project quickly.

$33 USD за 1 день
(96 відгуків(-и))
5.2
locdev

Hi, I'm experienced C# developer.

$90 USD за 1 день
(9 відгуків(-и))
4.6
triceraptordino

I'm interested by this project.

$60 USD за 2 дні(-в)
(11 відгуків(-и))
4.3
cheapexcell

Very simple, will be done in just 2-3 hours.

$49 USD за 0 дні(-в)
(17 відгуків(-и))
4.1
murtaza1981

Hi cnoces ,

$200 USD за 10 дні(-в)
(9 відгуків(-и))
4.0
gentechsolution

Hi, I have done many projects in C# .Net, I can complete it in 1 day.

$45 USD за 1 день
(20 відгуків(-и))
3.5
yeki

I'm an expert .NET developer. Please see your PMB.

$50 USD за 0 дні(-в)
(6 відгуків(-и))
3.5
HazemElhasan

I have 5 years experience in C# development.I can do it.

$30 USD за 2 дні(-в)
(4 відгуків(-и))
2.9
vks75

Hi, Please look at you PMB for more details.

$35 USD за 1 день
(2 відгуків(-и))
2.6
krishnadubey

Hello, I'll be happy to provide you console application in couple hours. Regards, Krishna

$30 USD за 1 день
(2 відгуків(-и))
2.4
sumon355

Hello, I am interested to do this work.

$45 USD за 1 день
(8 відгуків(-и))
2.2
dumbraveanualin

Hi, Count me in.

$50 USD за 5 дні(-в)
(2 відгуків(-и))
2.1
kodegun

Count me in.

$30 USD за 3 дні(-в)
(3 відгуків(-и))
2.1
MohabSystems

Please check PMB for details. Thank you

$100 USD за 1 день
(1 відгук)
1.5
tganesh123

Microsoft .NET Expert

$30 USD за 2 дні(-в)
(0 відгуків(-и))
0.0