September 08, 2006, 07:48 PM
dballestAlpha define field empty in WHERE clause
Usage of defined field which is an alphanumeric field. Using this defined field in the where clause of the report, it passes empty value. If I set up the same value in the variable in dialog manager and use in the where clause of the report it works, does anybody face this kind of issue and how did you resolved it ?
In advance thanks for your reply !
September 10, 2006, 11:37 PM
PiipsterCan you post your code?
September 11, 2006, 08:00 PM
dballestThanks for your reply !
Let me rephrase the question since now I found the problem here is passing parameters on Calling the Webservice and passes the defined field in the where clause doesn't work. It can only understand the Amper variables, so need to setup the date parameter in the string format before use in the where clause parameter.
Here is example
-SET &F='08/01/2006 06:00:00';
-SET &T='08/02/2006 06:00:00';
TABLE FILE ABC
PRINT
X1
X2
WHERE STRFROMDT = &F AND STRTODT = &T;
END ( IT's works)
My problem here now how to create the &F and &T.
I have &F and &T in the numeric format for e.g. 20060801 , how to concate and convert into string "08/01/2006 06:00:00". Tried the HCNVRT but didn't help. Let me know if you have idea.
Here is the example of code I tried ...
-SET &YR = EDIT(&DATEYYMD,'9999') ;
-SET &MO = EDIT(&DATEYYMD,'$$$$$99') ;
-SET &DD = EDIT(&DATEYYMD,'$$$$$$$$99') ;
-SET &TOX = &YR || &MO || &DD ;
-SET &FOX = AYMD(&TOX , -31, 'I8YYMD');
-SET &TOX1= DATECVT(&TOX, 'I6YMD', 'YYMD');
-SET &ALPHA_DATE1 = HCNVRT(&TOX, '(H17)', 17, 'A20');
September 11, 2006, 11:33 PM
dhagenIs this what you are looking for?
-SET &F = EDIT(&MDYY, '99/99/9999 ') | EDIT(HHMMSS('A8'),'99:$99:$99');
September 12, 2006, 01:38 PM
dballestquote:
-SET &F = EDIT(&MDYY, '99/99/9999 ') | EDIT(HHMMSS('A8'),'99:$99:$99');
Thanks for your reply !
This help me and able to solve the problem.