How do you want to do the split (and why)? You can start off with two views with queries to simulate the two tables. Then maybe decide if you need to go any further.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
the two tables will only be temp tables , will drop them afterwards. in fact i want to get the other half part of the table A i mean i need the 2 last records in another table.
--------------------------- there is no limits only God can stop me.
select * into TableA1 from TableA where birthdate in ('2012-07-1987T12:24:45', '2012-05-1990T07:20:00')
select * into TableA2 from TableA where birthdate not in ('2012-07-1987T12:24:45', '2012-05-1990T07:20:00')
Back to my original question.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
select * into TableA1 from TableA where birthdate in ('2012-07-1987T12:24:45', '2012-05-1990T07:20:00')
select * into TableA2 from TableA where birthdate not in ('2012-07-1987T12:24:45', '2012-05-1990T07:20:00')
Back to my original question.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
birthdate is in smalldatetime format not varchar.
--------------------------- there is no limits only God can stop me.
Shouldn't matter. The problem is with your data 2012-07-1987 12:24:45 You don't have valid dates.
If you correct the values it should be ok.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
select * into TableA1 from TableA where birthdate in ('2012-07-1987T12:24:45', '2012-05-1990T07:20:00')
select * into TableA2 from TableA where birthdate not in ('2012-07-1987T12:24:45', '2012-05-1990T07:20:00')
Back to my original question.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
why are date values like this? why is day portion four digits? birthdate is in smalldatetime format not varchar.
--------------------------- there is no limits only God can stop me.
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/