Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQL Query Issue in QTP
#1
Not Solved
Hello every one,

I am using the following Code -:

Code:
nowMonth=month(now)
nowDay=day(now)
nowYear=year(now)

TodayDate=nowYear&nowMonth&nowDay    
                StartDate=DateSerial(nowYear,nowMonth,nowDay-22)                                        StartMonth=month(StartDate)
StartDay=day(StartDate)
StartYear=year(StartDate)
                    NowStartDate=StartYear&StartMonth&StartDay      
                    
Dim kk
kk=20

And passing the following sql query -:
Code:
"select fromdomain, sum(total) as total,sum(delivered)as delivered,sum(bounced)as bounced,sum(readcount)as readcount,sum(replycount)as replycount,sum(unsub)as unsub from emailinfo where sdate1 >= '"+NowStartDate+"' and sdate1 <= '"+TodayDate+"' group by fromdomain order by fromdomain asc offset "+kk+" limit 20"

This query is causing the problem. If I pass offset 0 or 20 etc then query run perfectly but if I pass the offset value through a variable 'KK'. Its cuase problem.

Can anyone help here ?

Thanks in Advance !
Reply
#2
Not Solved
please replace +kk+ to & kk & . should work
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Rolleyes Browse object query Hema a newbie 0 1,807 07-22-2014, 08:37 PM
Last Post: Hema a newbie
  Query for configuration of Mail Body section through VB/QTP prasanna.rathinam 1 3,074 09-19-2013, 12:03 PM
Last Post: ssvali
  Exporting QTP runtime datatable to SQL server during SweetyChowdhury 1 3,260 05-10-2013, 03:41 AM
Last Post: sria123
  SQL on oracle database doesn't return a value Bluefields 2 3,254 07-09-2012, 01:23 PM
Last Post: Bluefields
  Do recordsets get to use only ONE query? Arena 0 2,191 04-03-2012, 07:08 PM
Last Post: Arena

Forum Jump:


Users browsing this thread: 1 Guest(s)