Home
SQL Blob Export online help Prev Page Prev Page
Introduction
About SQL Blob Export
Version history
Supported database engines
Supported file types
Contact us
Using SQL Blob Export
The Home page
Creating a project
Project settings
Database
Connecting to databases directly without client libraries installed
Connecting to an Oracle database
Source
Options
Naming convention tags
Date and time format specifiers
Progress

Tags

When naming files, you use tags as placeholders for system and column values.

System values
 
There are 2 system values you can use, the current row number, and the column number. Row numbers are indicated by the <%row%> tag, and column number by the <%columm%> tag e.g.  
 
filenames_05  
 
filenames_06  
 
You can add format specifiers to both these system values as they are numeric values. See below for details.  
 

Database column values
 
To use a value from a table or query column, enter the name of the column enclosed in angled brackets. For e.g. if you had the following result set:  
 
filenames_01  
 
and you wanted to name the exported files using the LargePhotoFileName value, simply enter the column name enclosed in angled brackets i.e.  
 
filenames_02  
 

Conditional specifier

You can also choose to use a tag only for specific columns. Say we have the following result set:  
 
   filenames_21  
 
 
We want to use the ThumbnailPhotoFileName column value when we export column 2, and the LargePhotoFileName column value when we export column 4. To do that, we add a conditional column tag to the end of the column tag e.g.  
 
filenames_22  
 
which results in this:  
 
filenames_23  


A conditional specifier can be used for system value tags and column value tags. It comes after any format specifiers, and is preceded by a : followed by the index of the blob data column that uses this value. In the example above, we had the following values:  
 
   <ThumbnailPhotoFileName::2><LargePhotoFileName:4>  
 
which means that use the value from ThumbnailPhotoFileName (with no format specifiers) when we are exporting blob data from column 2 in our result set, and use the value from LargePhotoFileName (again with no format specifiers) when we are exporting blob data from the 4th column in our result set.  
 
Another example, the following value:  
 
<ID:0000:2>  
 
means that we use the value from the ID column, is formatted to 4 digits, and is only used when we are exporting blob data from column 2 in our result set.  
 

Format specifiers


For file names, you can use the FILENAME format specifier to extract only the file name portion from a fully qualified file name. For e.g. the LargeImageFileName column below stores fully qualified file names:  

filenames_11  
 
Using the <LargePhotoFileName> tag results in errors when SQL Blob Export tries to generate the file names:  
 
filenames_13  

To address this, we append the FILENAME format specifier to the tag e.g.  

filenames_12  

SQL Blob Export now only uses the file name portion of the column value to generate file names i.e.  
 
filenames_14  


For numeric values, you can also use a format specifier. E.g. the <%row%> tag is a sequential number of each image that is exported. Using the tag without a format specifier will result in the following values: 1, 2, 3, ... (n). If you want to format the sequence value to 4 digits, prefixed with 0s, you can amend the tag to include the format specified this way: <%row:0000%>. This will then result in the following values: 0001, 0002, 0003, ... (n).  
 
For datetime values retrieved from a database column, you can also use format specifiers to determine how to display the datetime value. The default format is yyyymmdd, so for a datetime value of 31 January 1970, the displayed value is 19700131. See this page for details of the available datetime format specifiers.