Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL query 2

Status
Not open for further replies.

mikeyb123

Programmer
Jul 1, 2003
1,801
GB
Guys,

Hope you can help..

I wish to extract a certain amount of information out of our nice cls database, but I'm no good at sql.

I wnat to be able to extact all call records between 2 dates for a set group of agents.

something along the lines of

where date is between 7th jan..2nd Feb and agent id = xxx,xxx,xxx etc return all rows

Anyone know what the sql syntax is?

Many thanks in advance

It's not getting any smarter out there. You have to come to terms with stupidity, and make it work for you.
 
I have that exact query in my bible at home but i'm in the states at the moment. I will post it on sun if no one answers before.

Merry non denominational winter festival!!!

 
To get basic list of calls try
select * from nice_cls_calls_0001
where start_time > '2006-01-07'
and stop_time < '2006-02-03' --7th Jan to 2nd Feb inclusive
and (agent_id = xxxx
or agent_id = xxxx)

You could add the agent details by changing this to:
To get basic list of calls try
select * from nice_cls_calls_0001,user_info
where start_time > '2006-01-07'
and stop_time < '2006-02-03' --7th Jan to 2nd Feb inclusive
and (agent_id = xxxx
or agent_id = xxxx)
and nice_cls_calls_0001.agent_id = user_info.agentid

Date format is YYYY-MM-DD HH:MM:SS
 
Excellent! I'll give these a go

Cheers guys

It's not getting any smarter out there. You have to come to terms with stupidity, and make it work for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top