是否可以在 CSV 文件上 运行 SQL Select 语句?

Is it possible to run a SQL Select statment on a CSV file?

是否可以在 Sybase 数据库的 CSV 文件上执行 SQL Select 语句?

Update DBA.user_data                                                     
set user_data.date_Sent = '12/16/2015'                                                      
where user_data.caseid in (select caseid                                                     
                       from DBA.cases
                       where cases.caseid=user_data.caseid
                       And cases.caseid in (select * FROM    'C:\example\test.csv' WITH (FIELDTERMINATOR = ',',ROWTERMINATOR = '\n')));

假设您使用的是 Sybase ASE,您可以使用组件集成服务 (CIS) 访问平面文件。

我建议您查看 Component Integration Services User Guide,它是 SAP/Sybase 文档的一部分。

查看有关 File system access: File Access

的部分

您将使用定义中的文件信息创建代理(或现有代理)table。

create proxy_table <table_name>
    external file at " pathname" [column delimiter “<string>”]

create existing table fname (
    column1     int  null,
    column2     datetime null,
    column3     varchar(1024)  null
    etc. etc.
) external file at "pathname" [column delimiter “<string>”]

Only the select, insert, and truncate table statements are supported for file access. update and delete result in errors if the file proxy is the target of these commands.

Documentation: create proxy_table