i'm here first time any advice would be appreciated.
insert into ##temp values(convert(varchar,'select StartDate from JFTest11.dbo.FScalar',112), null,null,null);
my question is this: i have one main table ,there is one startdate colom which is datetime type. i make one temp table i want to insert all start date value in temp table using above command. there is 4 lakhs record in main table. there is need some change in my query to get all data in temp table pls.
when i'm running this command i got error message all time
Msg 241, Level 16, State 1, Line 1 Conversion failed when converting datetime from character string.
pls help me i,m helpless situation .it's very imp for my project. pls mail me on this id email@example.com
It should be
answered Oct 30 '09 at 09:43 AM
Or possibly this:
insert into ##temp SELECT convert(varchar,(select StartDate from JFTest11.dbo.FScalar),112), null,null,null
This will give an error IF the nested select returns more than one row (which may be what you want :) )
answered Nov 13 '09 at 12:02 PM