我尝试在查询中使用一个变量,使用sybase将unload导出到给定的文件名。
BEGIN
declare DBNAME varchar(255);
set DBNAME = (select db_name());
UNLOAD SELECT identifiant,
identifiant AS id_pat,
null AS id_sec,
null as id_pr,
id_localite AS id_loc,
id_assure AS id_pat_ass,
id_civilite AS id_civ,
null AS id_cg,
id_mutuelle AS id_mut
FROM patient TO 'C:\\TPA\\export\\'+DBNAME+'.csv';
END;
我在'+'sqlcode=-131附近得到一个错误
非常感谢你的帮助
暂无答案!
目前还没有任何答案,快来回答吧!