jasper parameter may or may not give

0

I need to have sql like seelct * from student where stuid='123456' and school_year='2017'  or  seelct * from student depende on do the two parameter be givein gor not

cactusbeef's picture
Joined: Apr 17 2016 - 8:29pm
Last seen: 2 years 6 months ago

1 Answer:

0

FOR ORACLE:     
seelct * from student where stuid=NVL('123456',stuid) and school_year=NVL('2017',school_year)

MYSQL
seelct * from student where stuid LIKE '123456%' and school_year LIKE '2017%'

Hope got your answer
For more query ask me at
Skype arif.3hosain

arif3hosain's picture
Joined: Apr 26 2015 - 11:59am
Last seen: 2 years 1 day ago
Feedback