1.

Solve : How to import data from .csv file into Access DB or SQL server DB using DOS.?

Answer»

Hi Team,

I need to GET some help to import the contents of .csv file into SQL server DB using DOS. Looking for
1. The fist column is date and TIME of polling and the data is in CSV looks like 48:31.3. Need to convert to actual date and time
2. I have some 50 COLUMNS, but i want to import only selected columns.

How can i do this. Here is the sample data. I have formatted first few lines for readability

Dt and time \\server\PhysicalDisk(0 C:)\% Disk Time\\server\PhysicalDisk(3 E:)\% Disk Time\\server\PhysicalDisk(4 F:)\% Disk Time
48:31.3
54:42.8 1.106900712 0.043827511 0
00:54.0 1.090129555 0.026666706 0
07:05.0 1.091367082 0.03266985 0
13:16.00.9451641680.0481341090
19:27.21.4893291610.0262434480
25:38.21.2341514370.0287062110
31:49.20.9630324160.0327694040
38:00.31.0257470270.0284869840
44:11.31.236794850.0318585110
50:22.31.0051180310.0205104130
56:33.51.0649525920.0433761810

thanks
HelenI got a soluiton - Can use BCP command.

Need some help to hand pick some columns to import and convert date

regards
HelenHow does 48:31.3 relate to a date and time?

As for the columns, are they space/tab separated? Which columns do you need?



Discussion

No Comment Found