Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INSERT COMMAND
Message
 
 
To
05/03/2009 01:55:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01385719
Message ID:
01385726
Views:
35
>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 #884312

If 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform