[cisco-voip] 2 rows DB query for UCCX

Matthew Saskin msaskin at gmail.com
Wed Nov 17 12:03:28 EST 2010


You should be able to use the SQL count() function in your query to return
the number of rows, and then query again to get specific rows.  The actual
returned results may vary in their look/feel depending on what DBMS you use,
but the premise is the same.

For example, let's say there's a table named "id_name" with 2 columns
("id","name") that allows duplicates.

table - id_name
ID | NAME
1  | Matthew
2  | Matthew
3  | Robert
4  | Matthew

select count(NAME) from id_name - should return 4, the ac
select count(NAME) from id_name where NAME="Matthew" - should return 3

Matthew Saskin
msaskin at gmail.com
203-253-9571



On Sat, Nov 13, 2010 at 2:20 AM, shary shary <shaary1 at hotmail.com> wrote:

>
>
> 1- its version is 7.0.1 with Sr4.
> 2- Infact this table can have more than more rows agains one field. Infact
> what i need to know first how many row returns after query to DB and if it
> has more than 1 row then get the data of all rows and save them in to an
> array and to access all of them one by one.
>
> Reagrds
> sheeraz
>
> ------------------------------
> Date: Thu, 11 Nov 2010 09:03:33 -0600
> Subject: Re: [cisco-voip] 2 rows DB query for UCCX
> From: avholloway+cisco-voip at gmail.com <avholloway%2Bcisco-voip at gmail.com>
> To: shaary1 at hotmail.com
> CC: cisco-voip at puck.nether.net
>
>
> 1. I have an idea about this, but not sure if it's available in 7.0(1) (you
> are on 7.0(1) correct? which SR?).
> 2. You cannot get the number of rows returned from the DB Read Step.  Under
> the success branch, create a loop, using a label and a goto step, that
> executes the DB Get step until it lands in the No Data branch.  Keep track
> of your loop count to know how many records were returned.
>
> Anthony
>
> On Thu, Nov 11, 2010 at 12:16 AM, shary shary <shaary1 at hotmail.com> wrote:
>
> hi folks,
> I have 2 queries regardin the UCCX 7.0.2.
>
> 1- My customer wants to catch the Call Release Event performed by the Agent
> on CAD and put it into any report. So i want to ask how would i catch this
> event and put it in customize report.
>
> 2- During DB fetching i got 2 rows against the one field and my ask is to
> chcek if DB is returing 2 rows against one field then it should ask for some
> more information otherwise go directly to agent. How can i check this option
> in a "Success option" of DB Read Node.
>
>
>
> Regards,
> Sheeraz Saeed lodhi.
>
>
>
>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20101117/1578a674/attachment.html>


More information about the cisco-voip mailing list