Getting id of Column values from db

how can i get id from db table for each column values with java or oracle query? i did get before each column content from file and now i need get the id of this column values from db. I read csv files from folder and then load the data from these files into subfolder, and here with line li = line.split(","); i get the values that i have in csv file and split them and become in li the value name, and then in else block i create a P objekt where i set this values from csv files, and with **p.setLid(li); i set the value for all valuenames, and then get these valuenames in separate column with other content from this csv, and my question is, i need to do this with db, and write these csv file values to the table in db (it will be done with another java class), what i need, that to write the ids of these values into the table in db, instead of valuename, and while there is no ids for valuenames in csv files, i need to get the id from the table in db where these are already listed with sequences, and i don’t know how can i write in data table the id of this valuenames and other content, this data table should contain the ids of valuenames timestamp values and the ids of the csv files name, i don’t know how to do this with the ids, i must get the ids from the db table and then set these on **p.setLid(li); where i set early the valuenames, instead of valuenames i should set ids, that will set ids automatically for all these valuenames.

try {  
            while ((line = br.readLine()) != null) {  
                if (lc == 0) {  
                    li = line.split(",");  
                }  
              else {  
 
                    String[] temp = line.split(",");  
 
                    for (int i = 1; i < temp.length; i++) {  
 
                        p = new P();  
 
                        p.setLid(li**);  
                        p.setSid(on);  
                            l.add(p);  
                    }  
           }  
                lc++;  
 
            }

with

li = line.split(",");

i got the values that then will be given to **p.setLid(li); and iterate, but now i want to get id from the table in db where this values stored with id instead of this column values, how can i do it? Any suggestions please.

(why in english in this german forum, is there no other? :wink: )

‚id from the table‘ is not clear, is it (1) one exact value saved in a ‚reference table‘
or do you need (2) the next value from an id generator, the id an new entry would get automatically if saved?

if clear is not possible → then there are examples :wink:
to (1):
what table is in the database, how big? can you load all possible data, build a map in Java <String → Id>?

otherwise you need a query ‚load value, idForValue from reference where value in (…)‘ with your current values