Hello u all, i've been reading some 'datetime'related entries but my problem remains unsolved.
I've got a table with a datetime-column (hhhh-mm-dd hh:mm:ss.mmm) and about 1000000 records.
I need to devide the table in several tables with the records of 1 month.
When i copy the data of 1 month to a second table, using;
***********************************************
insert into [surfdata2]
select * from surfdata
where datepart(month, logtime) = 2
order by logtime
***********************************************
...i loose the seconds of my logtimes!
e.g.
2001-02-01 20:14:23.000 (as present in surfdata)
turns into
2001-02-01 20:14:00.000
I'm at a total loss here, it's only an 'insert into' based on a 'select' statement?!.....
What am i missing here?
I've got a table with a datetime-column (hhhh-mm-dd hh:mm:ss.mmm) and about 1000000 records.
I need to devide the table in several tables with the records of 1 month.
When i copy the data of 1 month to a second table, using;
***********************************************
insert into [surfdata2]
select * from surfdata
where datepart(month, logtime) = 2
order by logtime
***********************************************
...i loose the seconds of my logtimes!
e.g.
2001-02-01 20:14:23.000 (as present in surfdata)
turns into
2001-02-01 20:14:00.000
I'm at a total loss here, it's only an 'insert into' based on a 'select' statement?!.....
What am i missing here?