Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

lr_db_executeSQLStatement is not returning rows if SQL with where clause having Date value

$
0
0

Dear Team,,

Please help on the below issue with  lr_db_executeSQLStatement :

The statement is working fine with the below examble without where clause having date and retunring the : Its returnung all the rows in the table with Joining Date and EmpID

NumRows = lr_db_executeSQLStatement("StepName=PerformQuery", 
                                        "ConnectionName=OraDBconnection", 
                                        "SQLStatement=select Joining_Date, EmpID FROM EMP_Table",
                                        "DatasetName=MyDataset", 
                                        LAST );

But when I add where Clause to filter with date, the Query is not retuning any rows:

NumRows = lr_db_executeSQLStatement("StepName=PerformQuery", 
                                        "ConnectionName=OraDBconnection", 
                                        "SQLStatement=select Joining_Date, EmpID FROM EMP_Table where Joining_Date='31-Aug-2016'",
                                        "DatasetName=MyDataset", 
                                        LAST );

where Joining_Date='31-Aug-2016' has been appended to first query and now ZERO rows are returned but it should display 5 rows as per my table.

I tried to Parameterise the Date field but no use.

Please help in this regard.


Viewing all articles
Browse latest Browse all 3978

Trending Articles