


CREATE TABLE DocumentStore AS FileTableįileTable_Collate_Filename = database_default The following example creates a new FileTable and specifies user-defined values for both FILETABLE_DIRECTORY and FILETABLE_COLLATE_FILENAME. If you do not provide names, then the system generates names as described later in this topic.įILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAMEįILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME You can also specify the names to be used for the 3 primary key and unique constraints that are automatically created. If the current database collation is case-sensitive, an error is raised and the CREATE TABLE operation fails. If you do not provide a value for FILETABLE_COLLATE_FILENAME, or you specify database_default, the column inherits the collation of the current database.

#HOW TO WRITE COLLATED FILE FOR RES2DINV WINDOWS#
The specified collation must be case-insensitive to comply with Windows file naming semantics. Specifies the name of the collation to be applied to the Name column in the FileTable. If you do not provide a directory name when you create the FileTable, then the name of the FileTable itself is used as the directory name.įILETABLE_COLLATE_FILENAME. Comparison for uniqueness is case-insensitive, regardless of the current collation settings. This name should be unique among all the FileTable directory names in the database. The directory name that you provide must comply with the requirements of the file system for a valid directory name. This value has a data type of nvarchar(255) and uses a fixed collation of Latin1_General_CI_AS_KS_WS. Specifies the directory that serves as the root directory for all the files and directories stored in the FileTable. You can specify the following settings for the new FileTable:įILETABLE_DIRECTORY.

Since a FileTable has a fixed schema, you do not have to specify a list of columns. The names to be used for the 3 primary key and unique constraints that are automatically created.Ĭreate a FileTable by calling the CREATE TABLE (Transact-SQL) statement with the AS FileTable option. The name of the collation to be used for file names in the Name column of the FileTable. In the FileTable folder hierarchy, this table-level directory becomes the child of the database directory specified at the database level, and the parent of the files or directories stored in the table. The simple syntax for creating a FileTable lets you specify:Ī directory name. You can create a new FileTable by using Transact-SQL or SQL Server Management Studio. For information about the FileTable schema, see FileTable Schema. This schema stores FILESTREAM data, file and directory information, and file attributes. Creating a FileTableĪ FileTable is a specialized user table that has a pre-defined and fixed schema.
#HOW TO WRITE COLLATED FILE FOR RES2DINV HOW TO#
Applies to: SQL Server (all supported versions)ĭescribes how to create a new FileTable, or alter or drop an existing FileTable.
