Home » Developer & Programmer » Forms » Block Where Clause Problem (Oracle 9i, Forms 6i)
Block Where Clause Problem [message #348195] Tue, 16 September 2008 00:08 Go to next message
sweetkhaliq
Messages: 200
Registered: April 2006
Senior Member

Dear Members

I want to populate the database block with the vales in fields of control block like Dated, dep_code, shift_code. So I have set block property where clause and write this syntex.

to_char(dated, 'ddmmrrrr') = to_char(:control.dated, 'ddmmrrrr') 
and nvl(shift_code, 'X') = nvl(nvl(:control.shift_code, shift_code), 'X') 
and emp_code in (select emp_code from pay_mast 
                 where dep_code = nvl(:dep_code, dep_code) 
                 and pay_mast.TERMINAT = 'N')


But when i press on populate button it give message query caused no rows return. But when i test the same query in toad it returns rows.

Please Tell me what is the problem.

Thank and Regards

[EDITED by LF: unreadable miles long code line has been reformatted]

[Updated on: Tue, 16 September 2008 00:34] by Moderator

Report message to a moderator

Re: Block Where Clause Problem [message #348225 is a reply to message #348195] Tue, 16 September 2008 02:18 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please post the 'create table' scripts for 'pay_mast' and your 'unnamed' block.

David
Previous Topic: Progress Bar
Next Topic: Getting program name in PL/SQL
Goto Forum:
  


Current Time: Thu Nov 07 16:22:52 CST 2024