Dynamic SQL Generator Online Help

Dynamic SQL Generator Online Help

Help Topics:

  1. What is Dynamic SQL Generator?
  2. How to Use Dynamic SQL Generator
  3. How to Activate the Ultimate Edition of Dynamic SQL Generator
  4. Examples of Generating and Using Dynamic T-SQL Scripts with Parameters

 

1. What is Dynamic SQL Generator?

With Dynamic SQL Generator, you can easily convert static T-SQL code to dynamic and vice versa. Along with the main functionality of the tool, there is a rich set of additional features that make it very easy to write and convert your T-SQL scripts.

Dynamic SQL Generator: Easily convert static SQL Server T-SQL scripts to dynamic and vice versa.

 

2. How to Use Dynamic SQL Generator

Using Dynamic SQL Generator is quite easy.

You can use Dynamic SQL Generator in three ways:

  • you can directly create a SQL script by writing the T-SQL script from scratch or by drag and dropping a .sql file into the SQL script code composer and converting it to dynamic SQL or static,
  • you an open an existing SQL script file and modify it or generate a new script file based on it along with converting it to dynamic SQL or static,
  • you can use a SQL script from the SQL Scripts Library and create a more sophisticated script based on it, along with converting the script’s code to dynamic SQL or static

After you finish composing the final SQL Script, you can export it to a file by clicking on the “Export to SQL File” button.

Dynamic SQL Generator: Easily convert static SQL Server T-SQL scripts to dynamic and vice versa.

 

 

3. How to Activate the Ultimate Edition of Dynamic SQL Generator

Procedure
You can easily activate the Ultimate Edition by following the below procedure:

  1. Within the program, click on the “Help” menu, and then click on “Activate Ultimate Edition”.
  2. In Step 1 on the “Activate Ultimate Edition” dialog, enter the serial key provided to you via email right after you purchased the license.
  3. In Step 2 on the “Activate Ultimate Edition” dialog, click on “Get Activation Code” in order to generate the activation code.
  4. Click on the “Request License File” button, and preferably, visit the SQLNetHub License Activation Service in order to activate your license following the online activation method.
  5. On the SQLNetHub License Activation Service website, select the software tool for which you would like to activate the license, in this case “Dynamic SQL Generator Ultimate”, then enter the serial key and activation code, and click on the “Get License File” button. If the information you entered is correct, the SQLNetHub License Activation Service will generate the license file and make it available for you in order to download it.
  6. Right after you download the license file, within Dynamic SQL Generator, click on the “Help” menu, then click on “Activate Ultimate Edition”, and finally click on the “Load License File” button. Next, select the license file generated by the SQLNetHub License Activation Service and click “Open”. If everything is OK, you will get a message that activation was successful.
  7. If activation was successful, please restart the program in order for all activation changes to take place.

For any issues or further assistance, you can contact us via our Contact Form.

 

 

4. Examples of Generating and Using Dynamic T-SQL Scripts with Parameters

Below, we provide some examples via screenshots, that show that Dynamic SQL Generator also converts static T-SQL scripts that include parameters to dynamic T-SQL scripts that are successfully ran in SQL Server Management Studio.

 

Example 1

Initial static T-SQL script:

-- Passing values as variables.  
DECLARE @param1 varchar(50), @param2 date;  
SET @param1 = 'The date value is: ';  
SET @param2 = getdate()

SELECT @Param1 as Param1Value, @Param2 as Param2Value;

 

Step 1: Write/paste the static T-SQL script in Dynamic SQL Generator:

Dynamic SQL Generator - Usage Examples

 

Step 2: Convert the static T-SQL script to dynamic:

Dynamic SQL Generator - Usage Examples

 

Step 3: Run the generated dynamic T-SQL script in SQL Server Management Studio (SSMS) to check it out

Dynamic SQL Generator - Usage Examples

 

Example 2

Initial static T-SQL script:

-- Passing values as variables. 
DECLARE @param1 varchar(50);  
SET @param1 = 'code2';  

CREATE TABLE #testTable(
code VARCHAR(50)
);

INSERT INTO #testTable(code)
VALUES ('code1'),('code2'),('code3');

SELECT *
FROM #testTable
WHERE code=@param1;

 

Step 1: Write/paste the static T-SQL script in Dynamic SQL Generator:

Dynamic SQL Generator - Usage Examples

Step 2: Convert the static T-SQL script to dynamic:

Dynamic SQL Generator - Usage Examples

 

Step 3: Run the generated dynamic T-SQL script in SQL Server Management Studio (SSMS) to check it out

Dynamic SQL Generator - Usage Examples

 

Extra Step: Running the generated dynamic T-SQL Script in SQL Server Management Studio (SSMS) to check it out along with externally passing the Parameter

Dynamic SQL Generator - Usage Examples

 

 

[Back to Product Page]