Avatar of UPRRDevelopers
UPRRDevelopers

asked on 

Need Some Basic Cold Fusion Logic Help

I'm a VB guy, but I have to do some Cold Fusion code.  I can write the SQL Statement to get the data I need, but I'll need to loop through the result set to extract the records I need.  I'm not asking anyone to code the request for me... I have at least four CF manuals that haven't been opened yet.  All I need to know is the basic syntax for what I need to do so I can find it in the book, study it, and learn what I need to do for this specific task.  This is basically what I need as an example:

SELECT EMP_ID, SALARY, FIRST_NAME, LAST_NAME, YEARS_EMPLOYED, POSITON FROM EMP

WHILE NOT EMP.BOF and NOT EMP.EOF

IF SALARY > 35000 Then
   Include This Employee in the List
ELSEIF YEARS_EMPLOYED > 5 Then
   Include This Employee In the List
ELSEIF POSITION IN ('AVP','DIRECTOR','MANAGER') Then
   Include This Employee In the List
END IF

Wend

Thanks for whatever pointers you can give me!!

   

 
Web Development Software

Avatar of undefined
Last Comment
gdemaria

8/22/2022 - Mon