-
import data from txt file
I have no previous experience in MS SQL and i have this little problem : i import data into a table from a txt file (log file after process) and i want to put the time/date string into a column with data type timedate, but i cant make it, there is an error message (cant store char data into timedate field...)
Any help??
thanx in advance :P
-
How are you importing it? Using DTS?
The format of date time in your text file may not be in compatible format with SQL Server datetime format.
Check BOL for all accepted formats.
-
I think you mean datetime column, it has its own format. But you should be able to put the time/date string into character column.
-
create a table with a column which has getdate() as default
create table x (mytext varchar(7500), date datetime default getdate())
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|