Codice java per leggere testo in un file e trasferire su db
Salve a tutti.
mi è stato assegnato questo compito, eseguibile in due maniere, tramite codice java o utilizzare le substring. questo codice mi deve estrapolare le informazioni da un file csv su una tabella
esempio:
ho un file nominato: cloud.csv e all'interno ho:
"ID","PARENTID","BODY"
"002w000000HCN8lAAH","001w0000018EwnBAAS","VFN O MILANO 2015"
"002w000000HCOMpAAP","001w000001CGs7oAAD",""
"002w000000HCctZAAT","001w000001J85enAAB",""
"002w000000HCdI7AAL","001w0000018ChhaAAC","Ask is it possible to have FEY BIKER SIZE 38"
"002w000000HDsnqAAD","001w000001L6vVmAAJ","Mer ge on field: ss_ID
Chosen value: 001w000001L6vVmAAJ
Other value(s):
001w000001CHTMAAA5
001w000001L6grhAAB
001w000001L6grmAAB
001w000001L6vVnAAJ
Merge on field: OwnerId
Chosen value: 005w0000003MODzAAO
Other value(s):
005w0000003M0onAAC
Merge on field: PersonMailingCity
Chosen value: SANCATALDO
Other value(s):
SAN CATALDO
Merge on field: PersonMailingState
Chosen value: MN
Other value(s):
CL
Vorrei tramite tirare fuori tutti i valori di Chosen value e inserirli in una tabella con due colonne, una master e una slade
la master deve contenere tutte le chosen valaue mentre la slade tutte le Other value(s)
esempio della tabella
Master Slade
001w000001L6vVmAAJ 001w000001CHTMAAA5
001w000001L6vVmAAJ 001w000001L6grhAAB
001w000001L6vVmAAJ 001w000001L6grmAAB
001w000001L6vVmAAJ 001w000001L6vVnAAJ
005w0000003MODzAAO 005w0000003M0onAAC
e cosi via per tutta la lunghezza del file, come potrei fare ?
grazie mille in anticipo