Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rookie_sql
Constraint Violating Yak Guru
443 Posts |
Posted - 2006-07-03 : 08:10:18
|
Hi i import a file and the date column has a period (.) as the separator so I've to import the column as text rather than date/time, can i change the format of the table via a update ? so the data type of the column date is date/time |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-07-03 : 17:45:19
|
You'll need to do it in 2 steps:1. Run an update query to get the date into the proper format2. Change the date type in the table and it should automatically convert the values for youNB: I'm not sure if step 1 would always be required - it depends if Access is able to implicitly convert the value to a date by itself. Normally, I like to import data into a staging table (i.e. all text columns) then use a query to convert/insert into the 'proper' table. HTH,Tim |
 |
|
karo
Starting Member
2 Posts |
Posted - 2006-07-04 : 18:43:21
|
quote: Originally posted by timmy You'll need to do it in 2 steps:1. Run an update query to get the date into the proper format2. Change the date type in the table and it should automatically convert the values for youNB: I'm not sure if step 1 would always be required - it depends if Access is able to implicitly convert the value to a date by itself. Normally, I like to import data into a staging table (i.e. all text columns) then use a query to convert/insert into the 'proper' table. HTH,Tim
Karen R DunningInformation Reference AdministratorRegion XIII ESC |
 |
|
karo
Starting Member
2 Posts |
Posted - 2006-07-04 : 19:13:13
|
If you are using standard import, when setting up the import, you should be able to check a box which indicates the first row is header, then 2 screens later, you can select the column with the datatype you wish to change and you would change the datatype there.Is this not working? Or are you using another import method?Karen R DunningInformation Reference AdministratorRegion XIII ESC |
 |
|
rookie_sql
Constraint Violating Yak Guru
443 Posts |
Posted - 2006-07-25 : 07:20:56
|
i do not see the 2nd screen, am using SQL 2000, |
 |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-07-25 : 17:45:19
|
What??!!Is this an Access question??? What does it have to do with SQL2000?? |
 |
|
|
|
|