Lancer une requete depuis un script

Résolu/Fermé
Decon Messages postés 91 Date d'inscription mercredi 29 août 2007 Statut Membre Dernière intervention 8 octobre 2014 - 25 mai 2011 à 19:02
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 - 25 mai 2011 à 19:05
Bonjour,
J'essaye de lancer cette requete en script sh; mais ça ne fonctionne pas.
Ma boucle for n'est pas exécutée. Quelqu'un peut il m'aider?
BG_ExecuterCommandeShell echo "SELECT account_no from cmf where statement_to_email is null and account_category=11 and bill_disp_meth =3" > $f_sqlreq
 BG_ExecuterCommandeSql -fPurgerFicTmp CUSTOMER $f_sqlreq ARBOR
 
 cat $FIC
 echo $FIC
 BG_TraceLog "95349" "$FIC"
 # for line in 'grep 'account_no=' $FIC'; do
  for line in ' $FIC'; do
    # prep_status='echo $line | cut -d'=' -f2'
    # status='echo $line | cut -d'=' -f3'
    # nb_bills='echo $line | cut -d'=' -f4'
	
	account_no='echo $line '
	echo ""
	echo "ICIIIIII :   $account_no"
	echo ""

	BG_TraceLog "95349" "Attention: Pas d'adresse email trouvé pour le compte account_no=$account_no"
	BG_ExecuterCommandeShell echo "UPDATE tbo_extracteur_facture SET STATUT_PGA=3, STATUT_RD=3 WHERE account_no=$account_no" > $f_sqlreq
	BG_ExecuterCommandeSql -fPurgerFicTmp CUSTOMER $f_sqlreq BOADM
 done


Merci d'avance.

1 réponse

zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 6 407
25 mai 2011 à 19:05
0