Newsgroup: it.comp.os.linux.development
Titolo: mysql: problema carattere accento

Utilizzando una funzione mi esporto i dati da access in un file di testo.
Il problema è che la "mia" procedura converte il carattere ' (accento) in /'
quando tento di importare con il comando mysql ho l'errore:
ERROR 1064 at line 125: You have an error in your SQL syntax near ''' at
line 1
infatti se tolgo i caratteri /' l'import va a buon fine...
Ma come deve essere convertito il carattere '   ?
Script usato per creare la tabella e per inserire il record (quello che ha
il problema)
DROP TABLE anacli\g
CREATE TABLE anacli(
     npc CHAR (6),
     datanas DATE,
     datadoc DATE,
     ultcont DATE,
     proxcont DATE,
     reddfatt INT,
     USER_NUM1 DOUBLE,
     USER_NUM2 DOUBLE,
     USER_NUM3 DOUBLE,
     USER_NUM4 DOUBLE,
     USER_NUM5 DOUBLE,
     USER_DATA1 DATE,
     USER_DATA2 DATE,
     USER_DATA3 DATE,
     numfigli SMALLINT,
     numdip SMALLINT,
     codgrup CHAR (4),
     tipcont CHAR (2),
     cognome1 CHAR (20),
     nome1 CHAR (15),
     titstud1 CHAR (5),
     topon1 CHAR (5),
     indir1 CHAR (15),
     numciv1 CHAR (6),
     cap1 CHAR (5),
     citta1 CHAR (25),
     prov1 CHAR (2),
     tel1 CHAR (12),
     topon2 CHAR (5),
     indir2 CHAR (15),
     numciv2 CHAR (6),
     cap2 CHAR (5),
     citta2 CHAR (25),
     prov2 CHAR (2),
     tel2 CHAR (12),
     codfisc CHAR (16),
     sesso CHAR (1),
     pater CHAR (20),
     codacq CHAR (7),
     cognome2 CHAR (20),
     nome2 CHAR (15),
     titstud2 CHAR (5),
     unitmerc CHAR (4),
     subage CHAR (3),
     statgiur CHAR (1),
     altrepol CHAR (1),
     tipdoc CHAR (2),
     rildoc CHAR (29),
     numdoc CHAR (10),
     modpag CHAR (2),
     statciv CHAR (2),
     zonterr CHAR (2),
     USER_DESCR1 CHAR (20),
     USER_DESCR2 CHAR (10),
     USER_DESCR3 CHAR (10),
     USER_DESCR4 CHAR (10),
     codabi CHAR (5),
     codcab CHAR (5),
     numcc CHAR (12),
     freqvis CHAR (1),
     codcin CHAR (1),
     statocli CHAR (1),
     residenza CHAR (3),
     tel3 CHAR (12),
     ultvar DATE,
     tptel1 CHAR (1),
     tptel2 CHAR (1),
     tptel3 CHAR (1),
     reddito_am CHAR (1),
     f_red CHAR (1),
     cliente_am CHAR (1),
     tipo_cliente CHAR (1),
     granrisc CHAR (1),
     cpfam CHAR (1),
     avvpag CHAR (1),
     coddip CHAR (17),
     codice_valuta_banca CHAR (3),
     cod_val_banc_ori CHAR (3),
     flag_bancomat CHAR (1),
     flag_carta_credito CHAR (1),
     flag_dossier CHAR (1),
     flag_gpm CHAR (1),
     flag_gpf CHAR (1),
     tipo_mutuo CHAR (1),
     tipo_conto CHAR (2),
     rete_finanziaria CHAR (1),
     prom_finanziario CHAR (5),
     codice_acq_banca CHAR (9),
     codice_cat_conto CHAR (2),
     data_accens_conto DATE,
     data_estins_conto DATE,
     data_blocco_conto DATE,
     filler CHAR (200),
     filler1 CHAR (200),
     filler2 CHAR (38),
     KEY (citta1),
     KEY (codice_acq_banca),
     KEY (codice_cat_conto),
     KEY (codice_valuta_banca),
     KEY (cognome1),
     KEY (modpag),
     KEY (nome1),
     KEY (npc),
     KEY (numcc),
     KEY (numciv1),
     KEY (numciv2),
     KEY (numdip),
     KEY (numdoc),
     KEY (numfigli),
     KEY (prov1),
     KEY (sesso),
     KEY (statgiur),
     KEY (statocli),
     KEY (subage)
)\g
INSERT INTO anacli VALUES
('000914','','','','',0,0,0,0,0,0,'','','',0,0,'','','A & B BELLANZIER
FRI','DA','','VIA','TURAZZA','8','37061','CA\' DI
DAVID','VR','','','','','','','','','01785600238','','MASCONALE
MAURIZIO','2000603','','','','','002','G','N','','','','','','','','','','',
'','','','','','C','I','','1995-03-25','','','','A','1','A','1','','','','',
'   ','   ',' ',' ',' ',' ',' ',' ','  ',' ','     ','         ','
','','','','
','
','                                      ')\g
grazie
ringo

 line 1
Per fare l'escape devi usare la backslash: \
ciao
Kronos
-- 
Home: 
http://kronoz.cjb.net
It can't rain forever,
but you can die before seeing the sun again.