" /> Using variables on IRD Database Wizard Query - Genesys CTI User Forum

Author Topic: Using variables on IRD Database Wizard Query  (Read 4893 times)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Using variables on IRD Database Wizard Query
« on: October 17, 2014, 03:55:46 AM »
Advertisement
Hi guys,
I never used this option too much but now as customer can't do WS I must...
I'm trying to do a simple query with the ANI as the data being queried against a customer table. I tried:

[code]
select clientedata from dual where ani = vANI
[/code]

But it doesn't understand that vANI is a variable...how to tell IRD it is?

Thanks!

Offline catanirex

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: 11
Re: Using variables on IRD Database Wizard Query
« Reply #1 on: October 17, 2014, 05:54:02 AM »
create a stored procedure with the simple question. Then it is easy to pass the variable.
Thats how we do it :)

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Using variables on IRD Database Wizard Query
« Reply #2 on: October 17, 2014, 05:55:49 AM »
Basically I tried just th same sql statement and IRD detected variable correctly.
What is IRD version that you use?

Offline Timur Karimov

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
Re: Using variables on IRD Database Wizard Query
« Reply #3 on: October 17, 2014, 09:01:57 AM »
Hi there.
You try to did it in query mode? Why? If you need a simple select  - just do it with standard select wizard.
WBR Tim

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Using variables on IRD Database Wizard Query
« Reply #4 on: October 17, 2014, 02:47:28 PM »
Hi guys,
Thanks a lot for the answers.

catarinex, yeah, I asked that too, but on customer it is like asking to develop a whole system...and need to go over N hands and approvals...sucks. Until that I need this working

terry, can you please share screenshots of what you did exactly? My IRD version is 8.1.300.22

Timur, yes, on query mode. Because it looks simpler, no the select wizard I need to create the table access, format and all that. As there are going to be like 20 of these I see it as a unnecessary task load and maintenance...
« Last Edit: October 17, 2014, 02:51:53 PM by cavagnaro »

Offline Timur Karimov

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
Re: Using variables on IRD Database Wizard Query
« Reply #5 on: October 18, 2014, 08:45:36 AM »
Well, i don't think what is supported by URS but try such syntax:
select clientedata from dual where ani = {vANI}
HIH
WBR Tim

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Using variables on IRD Database Wizard Query
« Reply #6 on: October 18, 2014, 03:16:10 PM »
Yeah, tried that already the same day and DBServer saw it as it, no translation to a variable...
:(

Offline terry

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: 35
Re: Using variables on IRD Database Wizard Query
« Reply #7 on: October 20, 2014, 04:58:14 AM »
I put some screenshots below.
http://www.4shared.com/zip/c81kTY6Eba/DB_online.html

But basically what I did is quite straightforward- create query as mentionesd, assign vANI value like 11111 and make request.
Up to my knowledge IRD supposed to check every name FOLLOWING operation like =, >, < etc for is it variable or not.

If there is no any misprinting (in name of vartiable, etc) and it is still not working then probably there is some hidden defect in IRD and Genesys Tech Support need to be contacted.

Also may be one thing to try - assign entire query as is to some variable (say MyQuery) and as query in DB Wizard use query in form @sql=MyQuery
 





Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Using variables on IRD Database Wizard Query
« Reply #8 on: October 20, 2014, 11:49:41 AM »
Thanks a lot terry! Will open a ticket with Genesys. Mine is like that.