Home » Developer & Programmer » Forms » string problem
string problem [message #341170] Sun, 17 August 2008 08:39 Go to next message
ora1980
Messages: 251
Registered: May 2008
Senior Member
please correct me if i am wrong


	l_where:='CUST_PO_NUMBER ='||''' :CONTROL_BLK.PO_NUMBER''';



cust_po_number is a varchar column....so i am trying to
build the where clause here.....i know for sure that
one single quote should be replaced by three if we want
to include a varchar colunmn..so is the above condition
valid one?
Re: string problem [message #341175 is a reply to message #341170] Sun, 17 August 2008 09:24 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

try this

l_where:='CUST_PO_NUMBER ='||''''||:CONTROL_BLK.PO_NUMBER||'''';

Re: string problem [message #341183 is a reply to message #341170] Sun, 17 August 2008 10:50 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why not simply
l_where := 'CUST_PO_NUMBER = ' || :CONTROL_BLK.PO_NUMBER;
Re: string problem [message #341270 is a reply to message #341183] Mon, 18 August 2008 02:07 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Dear Littlefoot,

I Think your code will not work as CUST_PO_NUMBER is a varchar datatype
Re: string problem [message #341286 is a reply to message #341270] Mon, 18 August 2008 03:48 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Huh, right ... I didn't read the question carefully enough. I apologize.

Here's how it is to be done: in order to check whether you've done it correctly or not, create a display item which will be used to show variable value (check the attached FMB file, based on Scott's schema), or display it using the MESSAGE built-in.

Shortly:
l_where := 'CUST_PO_NUMBER = ''' || :CONTROL_BLK.PO_NUMBER || '''';
Previous Topic: Something went wrong with WebUtil !!!
Next Topic: Subtract Record
Goto Forum:
  


Current Time: Sat Dec 10 18:13:35 CST 2016

Total time taken to generate the page: 0.08496 seconds