• Please (not plz) don't ask us to hurry along. People help people here in their own time. Nothing else.

    If you say the code does bot work, post some examples of the source data. Post screen dump of the derived column.

    As for the second option, anything more than this is actually doing it for you. Which I won't.

    Import the raw data into a SQL table, for basic data types. Run a conversion on it from there into the final table.

    Finally, read Jeff's article about etiquette: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    Are these interview or exam questions?

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!