我必须为 sql 插入编写脚本。我拥有编写插入内容所需的所有信息,但我正在使用三种不同的信息,而不仅仅是两条。我知道我必须将地图放在地图中,但是当我尝试将任何内容放入地图时出现编译错误。
HashMap<String,String> acctyp = new HashMap<String,String>();
HashMap<String, HashMap<String,String>> gens = new HashMap<String,HashMap<String,String>>();
gens.put("'GEN01'", acctyp.put("'Open'","ACCTYP 01"));
gens.put("'GEN02'", acctyp.put("'Sheltered'","ACCTYP 02"));
gens.put("'GEN03'", acctyp.put("'Spousal sheltered'","ACCTYP 03"));
gens.put("'GEN06'", acctyp.put("'Education'","ACCTYP 06"));
gens.put("'GEN12'", acctyp.put("'Non-ded. sheltered'","ACCTYP 12"));
gens.put("'GEN30'", acctyp.put("'Structured Product'","ACCTYP 30"));
gens.put("'GEN31'", acctyp.put("'Emergency Cash'","ACCTYP 31"));
gens.put("'GEN85'", acctyp.put("'Insurance Savings'","ACCTYP 85"));
gens.put("'GEN86'", acctyp.put("'Stock Option'","ACCTYP 86"));
gens.put("'GEN94'", acctyp.put("'Business Other'","ACCTYP 94"));
gens.put("'GEN95'", acctyp.put("'Personal use'","ACCTYP 95"));
gens.put("'GEN97'", acctyp.put("'Universal Life'","ACCTYP 97"));
如果有人对为什么我在 put 上遇到编译错误有任何见解,那么将不胜感激。