>I tried the following both are not working in SPT. Any idea?
>
>"insert into emp_master (emp_id,fir_name,passport_no) SELECT RTRIM(?ep_id),?fr_name,?pass_p from johu1 where not exists
>(select 1 from emp_master where RTRIM(emp_id)=RTRIM(?ep_id))"
>
>Another way.....
>
>insert into emp_master (emp_id,fir_name,passport_no) select RTRIM(johu1.ep_id),johu1.fr_name,johu1.pass_p from johu1 where not exists
>(select 1 from emp_master where RTRIM(emp_id)=RTRIM(johu1.ep_id))"
>
>
>Thanks Again
You can not use it this way. BTW, in the meantime I spent some time searching for this important message
Re: SqlStringConnection Thread #
884310 Message #
884312If you want to use parameters in insert, use it
insert into Emp_Master (emp_ID, ...) values (?ep_ID, ...)
BTW, why do you need to pass Emp_ID? Shouldn't it be an identity field?
If it's not broken, fix it until it is.
My Blog