哪位高手能给个QTP里数据库表中的数据排序脚本例子给我?
原脚本如下:
Dim conn,Rs,sql
Set conn=CreateObject("adodb.connection")
Conn.ConnectionString="DRIVER={PostgreSQL ANSI};DATABASE=ngse_voip;SERVER=192.168.1.141;PORT=5432;UID=nvadmin;PWD=nvpass"
conn.open Conn.ConnectionString
If conn.State = 0 Then
Msgbox "连接数据库失败"
Else
Msgbox "连接数据库成功"
End If
Set Rs=CreateObject("adodb.Recordset")
sql="select * from tf_voip_volume_day where date_id=20110703 order by seconds desc limit 3"
Rs.open sql,conn
If (Rs("seconds")>Rs("seconds")) and (Rs("seconds")>Rs("seconds")) Then
reporter.ReportEvent micPass,"验证查询结果-排序","默认排序条件的倒序排序查询结果是正确的。"
else
reporter.ReportEvent micFail,"验证查询结果-排序","默认排序条件的倒序排序查询结果是错误的!"
End If
Set conn=CreateObject("adodb.connection")
Conn.ConnectionString="DRIVER={PostgreSQL ANSI};DATABASE=ngse_voip;SERVER=192.168.1.141;PORT=5432;UID=nvadmin;PWD=nvpass"
conn.open Conn.ConnectionString
If conn.State = 0 Then
Msgbox "连接数据库失败"
Else
Msgbox "连接数据库成功"
End If
Set Rs=CreateObject("adodb.Recordset")
sql="select * from tf_voip_volume_day where date_id=20110703 order by seconds desc limit 3"
Rs.open sql,conn
If (Rs("seconds")>Rs("seconds")) and (Rs("seconds")>Rs("seconds")) Then
reporter.ReportEvent micPass,"验证查询结果-排序","默认排序条件的倒序排序查询结果是正确的。"
else
reporter.ReportEvent micFail,"验证查询结果-排序","默认排序条件的倒序排序查询结果是错误的!"
End If
请问一下标红的这段判断语句该怎么写? 怎么描述表里的列下的某字段与下一个字段比大小?