Quantcast
Channel: Micro Focus QTP (UFT) Forums - All Forums
Viewing all articles
Browse latest Browse all 1793

SQL Query Issue in QTP

$
0
0
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 !

Viewing all articles
Browse latest Browse all 1793

Trending Articles