Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT COMMAND
Message
 
 
À
05/03/2009 01:55:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01385719
Message ID:
01385726
Vues:
34
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform