VoiceGuide IVR Software Main Page
Jump to content

Sql Query Results Direct Into $Rv?

Recommended Posts

Is possible to get sql query results direct to $RV?

 

I get sql query results and in next step I assigning evaluate expression module assigning to Variable.

 

Example:

 

 

SQL query:

SELECT typ_dzialania as akcja FROM infolinia_podstawowe WHERE id_projektu=$RV[iD_projektu]

 

 

215541.375 23 2 1 rv add [action type_akcja]{0}

215541.375 23 d added action type_akcja | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 61 6b 63 6a 61 | 30 | 45) id=2

215541.375 23 d added action type_akcja | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 61 6b 63 6a 61 | 30 | 75) id=2

215541.375 23 2 1 rv add [action type_1]{0}

215541.375 23 d added action type_1 | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 31 | 30 | 46) id=2

215541.375 23 d added action type_1 | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 31 | 30 | 76) id=2

215541.375 23 2 1 rv add [action type_akcja_1]{0}

215541.375 23 d added action type_akcja_1 | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 61 6b 63 6a 61 5f 31 | 30 | 47) id=2

215541.375 23 d added action type_akcja_1 | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 61 6b 63 6a 61 5f 31 | 30 | 77) id=2

215541.375 23 2 1 rv add [action type_1_1]{0}

215541.375 23 d added action type_1_1 | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 31 5f 31 | 30 | 48) id=2

215541.375 23 d added action type_1_1 | 0 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 31 5f 31 | 30 | 78) id=2

215541.375 23 2 1 rv add [action type_RowCount]{1}

215541.375 23 d added action type_RowCount | 1 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 52 6f 77 43 6f 75 6e 74 | 31 | 49) id=2

215541.375 23 d added action type_RowCount | 1 | ( 61 63 74 69 6f 6e 20 74 79 70 65 5f 52 6f 77 43 6f 75 6e 74 | 31 | 79) id=2

 

 

$RV[action type_akcja] or $RV[action type_1] I need as $RV[akcja_1]

It helps to find data without remember position of data in sql query results.

Share this post


Link to post
Is possible to get sql query results direct to $RV?

The Database Query module does automatically save the retrieved information as Result Variables (RVs). As you show yourself in the posted example, the Database Query module created the following RVs:

 

$RV[action type_RowCount]

$RV[action type_akcja]

$RV[action type_akcja_1]

$RV[action type_1]

$RV[action type_1_1]

 

the name of the automatically created $RVs are always prefixed with the name of the module which created the RVs.

 

It helps to find data without remember position of data in sql query results.

So you can use this $RV later in the script:

 

$RV[action type_akcja]

 

or use this one:

 

$RV[action type_akcja_1]

 

the _1 suffix in the above RV just means that this is for the first row returned. This is done in case multiple rows are returned by the query.

Share this post


Link to post

If you want to store the data in $RV with another name then you will need to create this new $RV yourself.

This can be done using an Evluate Expression module (as it looks like you are doing now), or from a 'Run VBScript' module.

An Evluate Expression type module is the quicker option.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×