Solved

bcp and datetime columns

Posted on 1998-04-11
1
296 Views
Last Modified: 2008-03-06
How do I go about importing a date field in an ASCII text file into a SQL Server table smalldatetime column?
0
Comment
Question by:rhastings
1 Comment
 
LVL 7

Accepted Solution

by:
spiridonov earned 100 total points
ID: 1091219
Use fmt file with all columns specified as SQLCHAR. When importing dates make shure the date format settings in your PC regional settings, ASCII file and SQL server  are the same. (E.g mm/dd/yy in all settngs.)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now