• ZenMongoose
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

In SQL I can write a select as:

 

select cost, cost * :miles as flat-rate from abc where orig = 'Minneapolis' and dest = 'Dallas'

 

 

Since you can not use operators in SOQL - how do get around this limitation? Typically I will get back mulitple rows of rate for diffent time periods.

 

For instance the results should look like

 

time            orig    dest   rate/mile   miles     flat rate

last 7 days  MN     TX      1.00         1100     $1100

8 -20 days  MN     TX      1.10         1100     $1210

 

Any help is greatly appreciated!

In SQL I can write a select as:

 

select cost, cost * :miles as flat-rate from abc where orig = 'Minneapolis' and dest = 'Dallas'

 

 

Since you can not use operators in SOQL - how do get around this limitation? Typically I will get back mulitple rows of rate for diffent time periods.

 

For instance the results should look like

 

time            orig    dest   rate/mile   miles     flat rate

last 7 days  MN     TX      1.00         1100     $1100

8 -20 days  MN     TX      1.10         1100     $1210

 

Any help is greatly appreciated!

confused newbie here. I've read some previsous posts and I thought I had things right... apparently not.

I have tired  value="{!origZip}" and get save error -

ErrorError: Unknown property 'origZip' 

 

If I try value="{!rater.origZip}" and value="{!Rater__c.origZip}"/ I get

 

Error: Invalid field origZip for SObject Rater__c

 

 
Yes, I'm guessing at this point.

 

Any help would be greatly appreciated.

 

 

public class Rater{

    public String origZip {get; set;}   
    public String destZip {get; set;}
    public final Rater__c rater;

}

 

VFP

 

<apex:page StandardController="Rater__c">
    <apex:variable value="{!Rater__c}" var="rater" />
    <apex:pageBlock title="Spot Quote">
        <apex:pageblockSection>
            <apex:form>     
                <APEX:OUTPUTTEXT value="Orig Zip: "></APEX:OUTPUTTEXT>      
                <apex:inputText style="width: 50px" value="{!origZip}"/>
                <apex:outputText value="  "></apex:outputText>
                <APEX:OUTPUTTEXT value="Dest Zip: "></APEX:OUTPUTTEXT>      
                <apex:inputText style="width: 50px" />
                <apex:commandButton value="Rate"/>
            </apex:form>
        </apex:pageblockSection>
    </apex:pageBlock>
</apex:page>

  • March 04, 2010
  • Like
  • 0