SQLクエリで複数回渡す文字列のリストがあります。文字列をSQLクエリに渡すと宣言する
私はそれらを一度宣言してから、そのリストをクエリに渡したいと思います。これは可能ですか?
値:クエリの
'1-PGB4Z', '1-PGAT6', '1-PGB55', '1-PGB52',
'1-2SS1E6', '1-2SS1E3', '1-2RZQMZ', '1-2RZQNF', '1-2RZQMT', '1-2SACTZ',
'1-2S0GNR', '1-2S0GLP', '1-2S0GCN', '1-1VOMUX', '1-1VOMV0', '1-1VOMV3',
'1-1VOX7Z', '1-1VOX82', '1-1VOMV7', '1-1VOMVA', '1-1VOMVD', '1-1VOMVG',
'1-1VPMBV', '1-1VPMBY', '1-1VPMC4', '1-1VO9XD', '1-1VO9XG', '1-1VO9XJ',
'1-1VPMBY', '1-1VO9XJ', '1-1VO9XM', '1-1VO9Z6', '1-16PGRE',
'1-16PGRK', '1-16PGRH', '1-8MNWB', '1-9JAVH', '1-8ISTX', '1-N5KYK',
'1-KZMMH', '1-D7KG9', '1-9HCNP', '1-9H81K', '1-1C9F1P', '1-QBQQW',
'1-2S0F1P', '1-2S0F45', '1-2S17LK', '1-2S17LT', '1-2SL5D9', '1-2SDUQD'
一部:
select * from table1 t3
where
and t1.cse_id in
(select d.cse_id
from table1 d
where d.cse_employee_number in
(select substr(t2.emp_s3_id, 3,8) from table2 t2, table 3 T1
where t2.fk_resource_group_id = t1.resource_group_id
and t1.resource_group_id in (
'1-PGB4Z', '1-PGAT6', '1-PGB55', '1-PGB52',
'1-2SS1E6', '1-2SS1E3', '1-2RZQMZ', '1-2RZQNF', '1-2RZQMT', '1-2SACTZ',
'1-2S0GNR', '1-2S0GLP', '1-2S0GCN', '1-1VOMUX', '1-1VOMV0', '1-1VOMV3',
'1-1VOX7Z', '1-1VOX82', '1-1VOMV7', '1-1VOMVA', '1-1VOMVD', '1-1VOMVG',
'1-1VPMBV', '1-1VPMBY', '1-1VPMC4', '1-1VO9XD', '1-1VO9XG', '1-1VO9XJ',
'1-1VPMBY', '1-1VO9XJ', '1-1VO9XM', '1-1VO9Z6', '1-16PGRE',
'1-16PGRK', '1-16PGRH', '1-8MNWB', '1-9JAVH', '1-8ISTX', '1-N5KYK',
'1-KZMMH', '1-D7KG9', '1-9HCNP', '1-9H81K', '1-1C9F1P', '1-QBQQW',
'1-2S0F1P', '1-2S0F45', '1-2S17LK', '1-2S17LT', '1-2SL5D9', '1-2SDUQD',
'1-2SDUTD', '1-2FRRMN', '1-2GHUNX', '1-2FXDD6', '1-2FWFG1', '1-2FR8CR',
'1-2FWFLM', '1-2FH7YL', '1-2FRRMX', '1-2GDIE3', '1-2FWFQI', '1-2FWFNL',
'1-2U9ULR', '1-2U4ZZP', '1-2SC2WF', '1-2SXPKJ', '1-2TDSJ5')
ストアドプロシージャに渡しますか? – Magnus