mule : Query Orders in Salesforce - salesforce

I have a flow with Salesforce Connector with query as SELECT Id from 'Order'. I am getting the below error,
[MalformedQueryFault [ApiQueryFault [ApiFault exceptionCode='MALFORMED_QUERY'
exceptionMessage='
SELECT AccountId,Id FROM 'Order'
^
ERROR at Row:1:Column:25
unexpected token: 'Order''
extendedErrorDetails='{[0]}'
]
row='1'
column='25'
]
]
Any ideas what went wrong here?

Yes, remove the apostrophes.
SELECT Id from Order

When switched to NativeQueryLanguage from DataSense Query Language in Salesforce connector. It worked.

Related

Query not running properly

I ran a query using google big query but I get an error as a result. I don't know what could be wrong.
SELECT
usertype,
CONCAT(start_station_name, " to ", end_station_name) AS route,
COUNT(*) as num_trips,
ROUND(AVG(CAST(tripduration AS INT64)/60),2) AS duration
FROM
`bigquery-public-data.new_york_citibike.citibike_stations`
GROUP BY
start_station_name, end_station_name, usertype
ORDER BY
num_trips DESC
LIMIT 10
You must be getting this error: Unrecognized name: usertype . As the error suggests bigquery-public-data.new_york_citibike.citibike_stations dataset doesn't have any column usertype.
As #samuel mentioned, usertype column is present in new_york_citibike.citibike_trips. Do cross check your dataset before querying.

Alias Name issue in SNowflake

I am using a single query:
(SELECT *,'{"Source": "010","Keys": [{"Value": "CHARGE"}]}' AS ID1
FROM DETAILS) metrics
JOIN DIM.TYPE trant
ON metrics.ID1 = trant.BK_TRANSACTIONTYPE
But I am getting this error:
SQL compilation error: syntax error line 3 at position 30 unexpected
'metrics'.
Please advise how it can be solved.
Can you please try with below query. Hope it works :)
SELECT * FROM (SELECT *,'{"Source": "010","Keys": [{"Value": "CHARGE"}]}' AS ID1 FROM DETAILS) metrics JOIN DIM.TYPE trant ON metrics.ID1 = trant.BK_TRANSACTIONTYPE

Why is Access Database coming up with a syntax error for my select statement in my where clause?

I am quite new to access database and can't wrap my head around why a syntax error keeps popping up every time I try to run this query, I hope that you're able to help
SELECT Customer.forename, Customer.surname
FROM Customer, Booking
WHERE Booking.customerID=Customer.CustomerID AND Booking.childTicket=(SELECT
MAX(Booking.childTicket))
GROUP BY Customer.forename, Customer.surname;
The error says: Syntax error in query expression Booking.customerID=Customer.CustomerID AND Booking.childTicket=(SELECT MAX(Booking.childTicket)).
You must provide a complete subquery:
WHERE Booking.customerID=Customer.CustomerID AND Booking.childTicket=
(SELECT MAX(Booking.childTicket) FROM Booking)

How to use inner query to fetch data from salesforce to mule?

I wrote below query to fetch data from salesforce but getting error like "Unknown error parsing query"
select Email,Id from contact where Email in (select b.Email from contact as b group by b.Email having count(b.id) < 2 limit 1000)
inner query alone retrieving the set of mail Ids, please suggest.
Are you sure the issue is not related with the query / organisation ?
Using SOQL workbench --> https://workbench.developerforce.com
and getting this error:
MALFORMED_QUERY:
(select b.Email from contact as b group by b.Email having count(b.id)
^
ERROR at Row:1:Column:78
expecting a right parentheses, found 'group'
You can first check your query on Salesforce using developer console if its working or not.
If its returning required result in Salesforce then it will work in Mulesoft as well.

Search results could not be loaded at the moment. Retry

I'am get the follow error when try access apps or categories apps under plesk 12:
Search results could not be loaded at the moment. Retry
I have look at the follow article: http://kb.sp.parallels.com/en/121173
And get: ERROR 1146 (42S02): Table 'psa.smb_apspackages' doesn't exist
Under my
/usr/local/psa/admin/logs
I do not have error logs for
php_error.log
How to can I fix the error?
Looks like psa database was not correctly upgraded. Try to fix it with bootstrapper repair procedure.
Solved please check the follow post at plesk:
http://forum.sp.parallels.com/threads/search-results-could-not-be-loaded-at-the-moment-retry.324794/#post-763196
Use the command:
select count(*) from psa.smb_apsPackages where registryUid not in (select uid from apsc.aps_registry_object);
the article at plesk are current, reason for not work as:
select count(*) from psa.smb_apspackages where registryUid not in (select uid from apsc.aps_registry_object);
the p from apspackages need to be apsPackages
Thank you #IgorG for let me know

Resources