Problems with CONCENATE operator in VAD

Status
Not open for further replies.

jorlovs

Joined
Oct 10, 2012
Messages
1
Reaction score
0
Hello,

I have situation where I need to create VAD project for telephone number lookup in the 3CX callhistory table. Problem starts in the moment when we call to customer with the call format 0XXXXXX, but when customer calls us he calls with the format XXXXXX.

So to mach caller we need to caller XXXXXX number add 0 to make in SQL query.

So I'm tryning CONCENATE operator in expression:

CONCATENATE('0',RIGHT(session.ani,6)), but when created this it goes out with the error:

ERROR [42883] ERROR: operator does not exist: character varying = integer; Error while executing the query

In other case, if
 
How are you configuring your SQL query into your Database Access component?

If the database field is a varchar, when you compare you need to add quotes. For example:

SELECT * FROM table WHERE field_name = '{0}'

And then configure your first parameter with the expression you mentioned:
CONCATENATE('0',RIGHT(session.ani,6))

This is because the expression result will be put into the SQL query without quotes, so you need to add quotes to your SQL query to make the field a varchar.
 
Status
Not open for further replies.

Forum statistics

Threads
112,320
Messages
591,878
Members
165,466
Latest member
EMMEPICASA