Hi, here is the stored procedure. I got the errors with SAMPLE_DATE & RESULT_VALUE. Remaing columns are fine.

Source table columns and datatypes:

START DATE VARCHAR 25
RESULT VALUE VARCHAR 25

Destination table columns and datatypes:

SAMPLE_DATE DATETME 8
RESULT_VALUE NUMERIC 13(25,8)


CREATE PROCEDURE

SP_D_LEGACYSTORET_21FLVEMD_INS
AS
BEGIN
TRUNCATE TABLE D_LEGACYSTORET_21FLVEMD
INSERT INTO

D_LEGACYSTORET_21FLVEMD(STATIONID,DATASOURCE,
SAMPLE_DATE,PARAMETER_ORIGINAL,RESULT_VALUE)

SELECT a.[Primary Station ID] AS STATIONID,

'LEGACYSTORET_21FLVEMD' AS DATASOURCE,

CONVERT(DATETIME,a.[Start Date]) AS SAMPLE_DATE,

a.[Parameter Code] AS PARAMETER_ORIGINAL,

CASE WHEN isnumeric(a.[Result Value])=0 THEN NULL
WHEN isnumeric(a.[Result Value])=1 THEN
CONVERT(NUMERIC(25,9),a.[Result Value])
END AS RESULT_VALUE

FROM D_LEGACYSTORET_21FLVEMD_L a
END

GO

Errors are:

Server: Msg 241, Level 16, State 1, Procedure
SP_D_LEGACYSTORET_21FLVEMD_INS1, Line 5
Syntax error converting datetime from character string.

Server: Msg 8114, Level 16, State 5,
Procedure SP_D_LEGACYSTORET_21FLVEMD_INS1, Line 5
Error converting data type varchar to numeric.


please let me know where is the error

Thanks alot