You need to sign in to do that
Don't have an account?
Or Statement
What is the easiest way to use or statments in your query. What I currently have does not seem to want to work right and returns a malformed query. Thanks in advance.
zipfind1 = "BillingPostalCode = '" & zip & "'"
soql1 = "and type != '" & typec & "' or type != '" & typem & "'"
soql2 = "select id from account where " & zipfind1 & soql1
Dim qr As salesforce.QueryResult = Nothing
binding.QueryOptionsValue = New salesforce.QueryOptions
qr = binding.query(soql2)
c = 0
If qr.size > 0 Then
Console.WriteLine("blah")
For c = 0 To qr.records.GetUpperBound(0)
Dim m As salesforce.Account = CType(qr.records(c), salesforce.Account)
id = m.Id
API 4.0
VB.net 2003
Thanks again
Josh
Next
End If
soql1 = "and ( type != '" & typec & "' or type != '" & typem & "' )"
instead of
soql1 = "and type != '" & typec & "' or type != '" & typem & "'"
If I'm reading this right the concatinated string will look like this:
I believe there has to be a space after that closing tick around the zipcode before the and keyword in order for the query to run.