07-01-2017 07:04 PM
I'm trying to use the build in call studio DB element. When I execute the below query on my db, the ANI does not have single quotes around it. The ANI column in my db table is a varchar.
Can someone please let me know what do I need to do in call studio query statement so when vxml app sends query to sql server it has single quotes around the ani.
MY DB element query is = Select * from ANI where ANI = {CallData.ANI}
According to sql analyzer query shows up on sql server as 'Select * from ANI where ANI = 2814441313' (no single quotes around number)
Need it to show up on sql server as Select * from ANI where ANI = '2814441313' (i.e singel quotes surrounding number).
Thank you
07-10-2017 11:05 PM
Can you try using like below ::
Select * from ANI where ANI = \'2814441313\'
07-13-2017 05:17 AM
Are you still having trouble with this DB query?
I can't re-create this on my system. When I use single quotes in the
studio query, they come across as single quotes and work fine.
Are you calling a select statement, or calling a stored procedure? What
version of CVP and SqlServer are you using?
If it's a stored proc, can you try executing just a simple select
statement containing quotes and see if it works?
This would be a clue into what's wrong.
If it's a stored procedure, can you post the stored proc? And the table
schema you're working with?
07-13-2017 07:14 AM
Hi Janine
I deleted the database, re-added and the query with built in element is working every time now.
Thank you for our help.
regards
Daniel Dellinger │Executive Advisor - Telecommunications │' 480-391-4412 È 480-322-9528
│9501 E Shea Blvd., Mail Code 081, Scottsdale, AZ 85260
CONFIDENTIALITY NOTICE: This communication and any attachments may contain confidential and/or privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please notify the sender immediately by telephone and destroy all copies of this communication and any attachments.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide