Home » Developer & Programmer » Forms » concatenation problem (Forms 6i)
concatenation problem [message #461233] Thu, 17 June 2010 03:32 Go to next message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

hi....

i have 3 fields on my form

field name datatype
1. adm_date date
2. class_session number
3. class_display char


i want that select year from data and it insert into class_session
and when i inserted into ADM_YEAR in class_session then

i want that i m selecting class_session-class_session+1
mean 2010-2011
and i write following code for this purpose..

:CLASS_INFO.CLASS_SESSION := TO_NUMBER(TO_CHAR(:PERSONAL_INFO.ADM_DATE, 'RRRR'));
:CLASS_INFO.SESSION_DISPLAY := TO_CHAR(:PERSONAL_INFO.ADM_DATE, 'RRRR')||'-' ||TO_CHAR(:PERSONAL_INFO.ADM_DATE, 'RRRR')+1;


my all code working correct then i exclude '-'

and this error is occurred when i button pressed...

FRM-40735: WBP TRIGGER RAISED UNHANDLED EXCEPTION ORA-06502


PLS HELP ME WHAT CAN I DO IT MY WORK...
Re: concatenation problem [message #461239 is a reply to message #461233] Thu, 17 June 2010 04:03 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"+ 1" is arithmetic. First TO_NUMBER those values, add 1, and - finally - TO_CHAR the result.

Something like
:display := to_char(:adm_date, 'rrrr') ||'-'|| to_char(to_number(to_char(:adm_date, 'rrrr')) + 1)

[Updated on: Thu, 17 June 2010 04:03]

Report message to a moderator

Re: concatenation problem [message #461240 is a reply to message #461239] Thu, 17 June 2010 04:07 Go to previous message
allianz2010
Messages: 101
Registered: October 2009
Location: Pakistan
Senior Member

THANKS Littlefoot

I'LL DO IT...

Previous Topic: Filter the LOV values
Next Topic: progress bar on new form instance
Goto Forum:
  


Current Time: Fri Sep 20 00:27:15 CDT 2024