Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: open
I'm a newbie to mysql.. have been trying to make my way through it.. I have a table "registered_tags" with 2 columns..
1. reg_tags Varchar(16)
2. time_reg Timestamp
I need to load the table with tags info (16 char string) and have the date and time of insertion of that tag info to be inserted into the time_reg column automatically when the tag info is inserted..
My text file looks like this for now (made in windows) (space between fields is tab and lines are ending with '\r\n' <---- windows does that)
I'm using the following query:
load data infile 'expected.txt' into table registered_tags lines terminated by '\r\n'
All the timestamps are given the value of :
and when the query executes the following error is displayed for each row:
Data truncated for column 'Timestamp_Registered' at row 1
Can someone pls guide me how to go about inserting timestamps automatically into the timestamp_registered column whenever a new row is added through a data file?
Your help is much appreciated.. Thank you