Can the Query generator be used to update records, instead of just adding new records?
Yes, by writing an UPDATE query and clicking on the Execute button, the command will be sent to the SQL server and the existing records will be updated. For example, the update query below can be used to set the records in the ‘LastName’ column to ‘Armstrong’ for every record in the ‘FirstName’ column which is equal to ‘Ross’:
SET LastName = 'Armstrong'
WHERE FirstName = 'Ross'
Note that the Query generator cannot be used to execute multiple SQL statements. Each statement must be executed individually
Can I use multiple conditions in a SQL query?
Yes. The Query generator supports multiple conditions in the SQL statements, so the AND, OR and LIKE conditions can be used in conjunction.
Am I allowed to use data from any database and SQL server or just the currently connected database in ApexSQL Generate?
The Query generator can be used to import data from any database of any SQL server instance.
Can I select data from any column, regardless of data type?
No, the source column (from where the data is being extracted) and the target column (where the data is being inserted) need to have a matching data types.
Can I query out data from multiple columns by using JOIN condition and insert the returned values into the selected column?
Yes, the Query generator supports using the JOIN conditions. The existing records from different tables can be joined and inserted into the chosen column like in the example below:
INNER JOIN dbo.Table_2
ON Table_1.FirstName = Table_2.FName
What kind of predefined generators exist in ApexSQL Generate?
In ApexSQL Generate there are four basic types of predefined generators which all contain many subcategories:
- Personal – names, user names, title, email, phone number, initials…
- Geography – addresses, cities, states, regions, postal code, countries…
- Business – company names, currency code, credit card numbers, URLs, file paths…
- Art – music genres, composers, painters, artistic movements, writers…
How does ApexSQL Generate set up predefined generators?
ApexSQL Generate uses an algorithm which compares the SQL data type of the column and the value type of the generator. After that, the application will check the name of the column and the table to setup the predefined generator. The user has the ability to change these settings at any time.
Does ApexSQL Generate recognize CHECK constraints?
Yes, ApexSQL Generate has the ability to recognize many kinds of CHECK constraints. For instance, if CHECK constraint is:
(upper([Gender])='F' OR upper([Gender])='M')
ApexSQL Generate will setup Regular Expression generator by default with the expression “F|M”, which means that only ‘F’ or ‘M’ characters can/will be inserted into the particular column.
Why should I disable CHECK constraints then?
If a column has a CHECK constraint, the range of generated values for that column can be limited. When CHECK constraints are disabled, the full range of data can be inserted into the column by allowing the SQL server to ignore the constraint’s condition.
When should I disable INSERT triggers?
While inserting data into the database, ApexSQL Generate may fire INSERT triggers for certain tables which may degrade performance and trigger actions not intended from a bulk data insert operation. By checking the disable INSERT triggers option those actions can be avoided.