SlideShare a Scribd company logo
1 of 15
Download to read offline
PARAMETER SUBSTITUTION
IN AGINITYWORKBENCH
Author: Mary Uguet
Manager Database and DataWarehouse Architect
@Restaurant Services Inc.
1
What is the AginityWorkbench?
โ€ข The Aginity Workbench is a query tool that
allows to connect to a Netezza Appliance
for development purposes.
โ€ข The Aginity Workbench is free and very
easy to use.
โ€ข The Aginity Workbench connects to
Netezza via OLEDB or ODBC.
โ€ข The Aginity Workbench allows the Netezza
developer to write and test SQL code,
stored procedures, views and other
database objects.
2
The Problem
โ€ข Many times you are faced with the need to run a query using different date ranges,
or change the filters applied to the WHERE clause.
โ€ข Aginity Workbench only allows to DECLARE variables within the body of a STORED
PROCEDURE, which is inconvenient when testing a complex script.
In the example below, if you want to run the query for different titles, you have to
edit the query and change the value to test. This query is very simple but imagine a
more complex script with different variables. How many โ€œfind and replaceโ€ you have
to execute!
3
The Solution : Parameter Substitution
This is where the Parameter
Substitution feature in Aginity
Workbench comes to the rescue.
You can use parameters that follow
the $ParameterName mask.The
feature can be enabled by selecting
the โ€œEnable Parameterized Queriesโ€
checkbox in the Query Options
Window.
4
The Solution: Parameter Substitution
5
Next click on โ€œCurrent Query Optionsโ€
The Solution: Parameter Substitution
6
Then check โ€œEnable parameterized queries
The Solution: Parameter Substitution
To use the parameter substitution feature, create a SQL statement and your
parameter using the $ sign:
7
The Solution: Parameter Substitution
When this query is executed, a window pops up to prompt for theTITLE:
Notice the parameter name $title, a section to enter its value and the data type.
8
The Solution: Parameter Substitution
The different data types that can be selected are:
9
The Solution: Parameter Substitution
In this example, you can use the string data type and enter for example Sr.
10
The Solution: Parameter Substitution
Once you click on โ€œOK, the results will show as follows:
11
The Solution: Parameter Substitution
If you are running a script and you need to make the table name dynamic or
dynamically build the SQL statement, the parameter substitution feature can be use
as follows:
12
The Solution: Parameter Substitution
When you click on โ€œExecuteโ€, Aginity prompts for the $title and $table. In the case
of $table, the parameter has to be defined as Inserted โ€œAs-Isโ€ data type.
13
The Solution: Parameter Substitution
The results will be the same as shown in slide #11:
14
Thank you
I hope by talking about this feature in Aginity, I can
make your life as a developer a little bit more easier.
Enjoy!
Connect with me:
15
muguet@rsilink.com
Mary Uguet

More Related Content

What's hot

What's hot (6)

Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms Introduction
ย 
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
Multiple Flat Files(CSV) to Target Table in ODI12c(12.2.1.0.0)
ย 
Webinar evoluciรณn a Oracle WebLogic Server 11g
Webinar evoluciรณn a Oracle WebLogic Server 11gWebinar evoluciรณn a Oracle WebLogic Server 11g
Webinar evoluciรณn a Oracle WebLogic Server 11g
ย 
Advanced sql
Advanced sqlAdvanced sql
Advanced sql
ย 
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
ย 
Lazy vs. Eager Loading Strategies in JPA 2.1
Lazy vs. Eager Loading Strategies in JPA 2.1Lazy vs. Eager Loading Strategies in JPA 2.1
Lazy vs. Eager Loading Strategies in JPA 2.1
ย 

Similar to Parameter substitution in Aginity Workbench

Ebook7
Ebook7Ebook7
Ebook7
kaashiv1
ย 
Less07 2 e_testermodule_6
Less07 2 e_testermodule_6Less07 2 e_testermodule_6
Less07 2 e_testermodule_6
Suresh Mishra
ย 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
kaashiv1
ย 
Ebook12
Ebook12Ebook12
Ebook12
kaashiv1
ย 
Expert Quick Tour
Expert Quick TourExpert Quick Tour
Expert Quick Tour
Active Base
ย 
Ryan-Symposium-v5
Ryan-Symposium-v5Ryan-Symposium-v5
Ryan-Symposium-v5
Kevin Ryan
ย 
Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republic
Kaing Menglieng
ย 
Ob loading data_oracle
Ob loading data_oracleOb loading data_oracle
Ob loading data_oracle
Steve Xu
ย 
Stored procedure tunning
Stored procedure tunningStored procedure tunning
Stored procedure tunning
Virendra Yaduvanshi
ย 

Similar to Parameter substitution in Aginity Workbench (20)

Optimizer overviewoow2014
Optimizer overviewoow2014Optimizer overviewoow2014
Optimizer overviewoow2014
ย 
Ebook7
Ebook7Ebook7
Ebook7
ย 
Sql interview question part 7
Sql interview question part 7Sql interview question part 7
Sql interview question part 7
ย 
Less07 2 e_testermodule_6
Less07 2 e_testermodule_6Less07 2 e_testermodule_6
Less07 2 e_testermodule_6
ย 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
ย 
Ebook12
Ebook12Ebook12
Ebook12
ย 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
ย 
Oracle Sql Tuning
Oracle Sql TuningOracle Sql Tuning
Oracle Sql Tuning
ย 
Teradata sql-tuning-top-10
Teradata sql-tuning-top-10Teradata sql-tuning-top-10
Teradata sql-tuning-top-10
ย 
Expert Quick Tour
Expert Quick TourExpert Quick Tour
Expert Quick Tour
ย 
Access tips access and sql part 1 setting the sql scene
Access tips  access and sql part 1  setting the sql sceneAccess tips  access and sql part 1  setting the sql scene
Access tips access and sql part 1 setting the sql scene
ย 
Ryan-Symposium-v5
Ryan-Symposium-v5Ryan-Symposium-v5
Ryan-Symposium-v5
ย 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
ย 
Using sql server 2008's merge statement tech republic
Using sql server 2008's merge statement   tech republicUsing sql server 2008's merge statement   tech republic
Using sql server 2008's merge statement tech republic
ย 
Ob loading data_oracle
Ob loading data_oracleOb loading data_oracle
Ob loading data_oracle
ย 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
ย 
Whitepaper Performance Tuning using Upsert and SCD (Task Factory)
Whitepaper  Performance Tuning using Upsert and SCD (Task Factory)Whitepaper  Performance Tuning using Upsert and SCD (Task Factory)
Whitepaper Performance Tuning using Upsert and SCD (Task Factory)
ย 
Stored procedure tunning
Stored procedure tunningStored procedure tunning
Stored procedure tunning
ย 
Technical stream presentation
Technical stream presentationTechnical stream presentation
Technical stream presentation
ย 
Optimize access
Optimize accessOptimize access
Optimize access
ย 

Recently uploaded

Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
amitlee9823
ย 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
Lars Albertsson
ย 
Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...
amitlee9823
ย 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
ย 
CHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
shivangimorya083
ย 
Delhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
shivangimorya083
ย 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
SUHANI PANDEY
ย 

Recently uploaded (20)

Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
ย 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
ย 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
ย 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
ย 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
ย 
Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore...
ย 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
ย 
CHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
ย 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
ย 
BDSMโšกCall Girls in Mandawali Delhi >เผ’8448380779 Escort Service
BDSMโšกCall Girls in Mandawali Delhi >เผ’8448380779 Escort ServiceBDSMโšกCall Girls in Mandawali Delhi >เผ’8448380779 Escort Service
BDSMโšกCall Girls in Mandawali Delhi >เผ’8448380779 Escort Service
ย 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
ย 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
ย 
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
ย 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
ย 
Delhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 โ˜Žโœ”๐Ÿ‘Œโœ” Whatsapp Hard And Sexy Vip Call
ย 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
ย 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
ย 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
ย 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
ย 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
ย 

Parameter substitution in Aginity Workbench

  • 1. PARAMETER SUBSTITUTION IN AGINITYWORKBENCH Author: Mary Uguet Manager Database and DataWarehouse Architect @Restaurant Services Inc. 1
  • 2. What is the AginityWorkbench? โ€ข The Aginity Workbench is a query tool that allows to connect to a Netezza Appliance for development purposes. โ€ข The Aginity Workbench is free and very easy to use. โ€ข The Aginity Workbench connects to Netezza via OLEDB or ODBC. โ€ข The Aginity Workbench allows the Netezza developer to write and test SQL code, stored procedures, views and other database objects. 2
  • 3. The Problem โ€ข Many times you are faced with the need to run a query using different date ranges, or change the filters applied to the WHERE clause. โ€ข Aginity Workbench only allows to DECLARE variables within the body of a STORED PROCEDURE, which is inconvenient when testing a complex script. In the example below, if you want to run the query for different titles, you have to edit the query and change the value to test. This query is very simple but imagine a more complex script with different variables. How many โ€œfind and replaceโ€ you have to execute! 3
  • 4. The Solution : Parameter Substitution This is where the Parameter Substitution feature in Aginity Workbench comes to the rescue. You can use parameters that follow the $ParameterName mask.The feature can be enabled by selecting the โ€œEnable Parameterized Queriesโ€ checkbox in the Query Options Window. 4
  • 5. The Solution: Parameter Substitution 5 Next click on โ€œCurrent Query Optionsโ€
  • 6. The Solution: Parameter Substitution 6 Then check โ€œEnable parameterized queries
  • 7. The Solution: Parameter Substitution To use the parameter substitution feature, create a SQL statement and your parameter using the $ sign: 7
  • 8. The Solution: Parameter Substitution When this query is executed, a window pops up to prompt for theTITLE: Notice the parameter name $title, a section to enter its value and the data type. 8
  • 9. The Solution: Parameter Substitution The different data types that can be selected are: 9
  • 10. The Solution: Parameter Substitution In this example, you can use the string data type and enter for example Sr. 10
  • 11. The Solution: Parameter Substitution Once you click on โ€œOK, the results will show as follows: 11
  • 12. The Solution: Parameter Substitution If you are running a script and you need to make the table name dynamic or dynamically build the SQL statement, the parameter substitution feature can be use as follows: 12
  • 13. The Solution: Parameter Substitution When you click on โ€œExecuteโ€, Aginity prompts for the $title and $table. In the case of $table, the parameter has to be defined as Inserted โ€œAs-Isโ€ data type. 13
  • 14. The Solution: Parameter Substitution The results will be the same as shown in slide #11: 14
  • 15. Thank you I hope by talking about this feature in Aginity, I can make your life as a developer a little bit more easier. Enjoy! Connect with me: 15 muguet@rsilink.com Mary Uguet