Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Unable to pass year as string in sql query
Migrateduser
Hi,
I am using BIRT 2.3.2 and i want to pass string into my sql query.
In BIRT my query is as follows
var sqlText = new String();
var sqld= new String();
sqld= '2013' ;
// Add query to sqlText variable.
sqlText =" select pmnum,SITEID,(select description from locations where pm.location = locations.location) "
+ "as Site, "
+ "(select wonum from workorder where "
+ "workorder.pmnum = pm.pmnum and targstartdate > sqld+'-07-01' and targstartdate "
+ "<'2013-08-01') as july "
+ " from pm where siteid = 'A' "
+ "and status = 'ACTIVE' "
+ "and pfmanticipated > 0 "
+ "ORDER BY pmnum "
The above query is pulling no data. If i use '2013'+'-07-01' instead of sqld+'-07-01' it will work. Any idea why it is behaving like this,my basic concern is to pass (year) string as parameter and then concatenate with month and day('-07-01') that is hard coded. Cheers
Find more posts tagged with
Comments
There are no comments yet