www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
csv_cols_def
csv_load
csv_load_file
csv_parse
csv_table_def
file_delete
file_dirlist
file_mkdir
file_mkpath
file_open
file_stat
file_to_string
file_to_string_outpu...
file_unlink
get_csv_row
gz_file_open
os_chmod
os_chown
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

csv_table_def

Guess table definition from CSV file.
csv_table_def (in file_name varchar);
Description

This function will return table definition appropriate for CSV file specified by file_name.

Parameters
file_name – The name of the CSV file.
Examples

SQL>select csv_table_def('tmp/MyContacts.csv');
callret
VARCHAR
_______________________________________________________________________________

CREATE TABLE "tmp_MyContacts_csv" (
        "First_Name_Last_Name_Middle_Name_Name_Nickname_E_mail_Address_Home_Street_Home_City_Home_Postal_Code_Home_State_Home_Country_Region_Home_Phon
e_Home_Fax_Mobile_Phone_Personal_Web_Page_Business_Street_Business_City_Business_Postal_Code_Business_State_Business_Country_Region_Business_Web_Page_
Business_Phone_Business_Fax_Pager_Company_Job_Title_Department_Office_Location_Notes" VARCHAR)

1 Rows. -- 10 msec.