3
我有這個SQL與「UNION」。 「FROM」部分被省略。這個SQL生成一個批處理文件,其中命令的順序很重要。手動排序concat文本(不是ASC或DESC)
SELECT 'DISCONNECT ent_user FROM job_code WITH user_id ="'
|| a.user_id
|| '" , jc_name = "'
|| b.jc_name
|| '";'
FROM
[...]
UNION
SELECT 'DISCONNECT rss_user FROM user_group WITH rss_user_name = "'
|| a.user_id
|| '" rss_name = "'
|| b.rss_name
|| '" rss_type = "'
|| b.rss_type
|| '" , ug_name = "'
|| b.ug_name
|| '";'
FROM
[...]
UNION
SELECT 'DELETE rss_user WITH rss_user_name = "'
|| a.user_id
|| '" rss_name = "'
|| b.rss_name
|| '" rss_type = "'
|| b.rss_type
|| '";'
FROM
[...]
我希望有這種排序。這是手動不是ASC或DESC。
1) DISCONNECT ent_user FROM job_code ...
2) DISCONNECT rss_user FROM user_group ...
3) DELETE rss_user WITH rss_user_name
怎麼辦?