Questions tagged [query]

A query is an inquiry into the database using the SELECT statement. A query is used to extract data from the database in a readable format according to the user's request.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

How to use where clause in soql query?

I want to query account object in Salesforce I have an account which it's name : CLB Com' , i want to query it's fields My soql query doesn't work ; select name , (other custom fields ) from ...
-2
votes
1answer
26 views

Is it possible to merge Data from List and Data Extension via query in Marketing Cloud? [closed]

Is it possible to merge Data from List and Data Extension via query in Marketing Cloud? I need to create a Data Extension with SubscriberKey from the list and FirstName from the Data Extension. Which ...
1
vote
0answers
35 views

SOQL query with 'LIKE not giving expected results

In my org, I've set up some custom metadata on which I have all text fields which I am querying. On my query without anything in the where condition SELECT Label,Fields__c,Labels__c,Scheme__c from ...
-2
votes
1answer
27 views

Generate a table embedded in an email from a SOQL query [closed]

I would need to generate a table out of a SOQL query and embed this in an email using Apex. I know that there is a good method for that setHtmlBody(HTMLBody), but, as I am new at programming, I do ...
6
votes
2answers
8k views

isDeleted=True is not working in SOQL query

Wondering why this query will retrieve ZERO records when executed in Workbench and Developer console. (Though i have records in Recycle Bin) Select Id, IsDeleted FROM Account WHERE IsDeleted = TRUE ...
1
vote
1answer
21 views

Unable to Perform SOQL Query Involving Lookup Field

I have a custom object (Registration__c) that has a lookup field (Approver__c) to the standard User object. I'm trying to construct an SOQL query that will return the user's ID. My assumption is ...
0
votes
1answer
57 views

Contact fields not accessible in SOQL Query on User

I am working with Community users and I need to query both their User and Contact details at the same time. When I am performing a relationship query like [Select Id, Email, ContactId, Contact....
3
votes
1answer
26 views

Can There be Multiple Result IDs for a Query Operation Result?

When retrieving the result of a batch of a query bulk job, according to the documentation, the following is returned. <result-list xmlns="http://www.force.com/2009/06/asyncapi/dataload"> <...
5
votes
1answer
140 views

SOQL bug for null required-lookup fields?

It appears that querying null values for required lookup fields always returns 0 results, even if some records have no value in the required field (e.g. records created before the field was made ...
0
votes
0answers
31 views

Error in query with Synch DE

I have synchronized two De from sales Cloud successfully and I'm now trying to run a query using them. I get an error message which tells they are unknown. I wonder which can be the error causing ...
6
votes
2answers
6k views

Query Chatter Feed, Topics, and Groups

First off, my end goal is lofty and time-consuming, but we need metrics and this is the best way to do it (that I can think of). Originally, a chatter post was created on the quote, case, or where ...
0
votes
1answer
30 views

Automation studio - Error in Query script

I'm running a query with the following structure SELECT * FROM [nameDE] WHERE PersonhasOptoutOfEmail = No I got an error message on the WHERE condition and I don't understand which is the issue. ...
0
votes
2answers
25 views

Duplicate data from a synchronized data extension- Can't see the Syn DE in Automation studio

i'm working in Automation Studio in order to duplicate the data of synchronized DE into a new sendable DE. The problem I have is that I see the synchronized DE in Contact Builder but I can't find it ...
1
vote
2answers
563 views

No such column 'CreatedDate' on Custom_Object__Share

I was trying to query Custom_Object__Share SELECT Id, ParentId,UserOrGroupId, AccessLevel, RowCause from Custom_Object__Share where CreatedDate > 2016-08-25T00:25:43Z I am getting an error no ...
1
vote
2answers
2k views

Old style JOIN (ANSI JOINs) syntax is not allowed. Please use standard syntax

A client has asked me to write a rather complex SQL query to be used on Salesforce. When trying to implement the finished query on the Queries page I get the following error: Old style JOIN (ANSI ...
6
votes
1answer
1k views

SOSL query returns only 250 records even if there are more than 2000+ records present

I have two queries List<sobject> soslRecords1 = Search.query('FIND {I need help res*} in all fields returning Incident__c (id) where ID IN:rec_ids')[0]; List<sobject> ...
11
votes
5answers
11k views

Can a SOQL query selecting all columns be generated at runtime?

It seems like SOQL does not have an equivalent to SQL's "SELECT * FROM ..." (If SOQL has this syntax, show me and I will mark that as the answer.) To get around this limitation, I have been using a ...
1
vote
0answers
18 views

INVALID_TYPE ERROR while querying using REST API

I'm trying to run a query using REST API (RestSharp). This is my query: [SELECT Id FROM Account] This is my code: RestClient m_Client = new RestClient("https://my_instance.salesforce.com"); string ...
0
votes
1answer
20 views

When I am querying from User object facing error Illegal assignment from List<User> to List<User>

When I am doing two SOQL queries in an apex method on User Object, facing an error like- User u = [SELECT Id, IsActive FROM User WHERE username = 'some username']; List<User> userList = [...
0
votes
1answer
31 views

Salesforce Marketing Cloud Query - Count by Date and Appointment Status, Group By CustomerID

I'm not proficient in SQL Query. I'm hoping someone on here can help me write this query for Saleforce Marketing Cloud, which uses a "limited" SQL Server 2016. Problem: I'm trying to extract month ...
1
vote
1answer
419 views

Query to pull unsubscribes from Journey?

I'm trying to write a query that will pull unsubscribes from a specific journey. Referencing the the SQL Query Activity I see several examples of pulling from Journey's by bounce and click activity, ...
0
votes
0answers
35 views

Smarter ways to write APEX class which consists of multiple methods executing a DML statement

I have a scheduled job that executes several methods from one apex class, code as follow; public class dailyUpdates{ Date Dday = system.today(); public void scheduledUpdates(){ ...
0
votes
1answer
19 views

add hours to timestamp / sql activity

I want to add 7 hours to a timestamp value and write the value into another data extension. How can I add these hours? My poor first try: SELECT DATEADD(HOUR,+7,dateregister) AS ...
3
votes
1answer
1k views

Edit Permissions for Guest Users after “Secure guest user record access”

Salesforce Alerted me that at the end of February we would be forced into the security update for "Secure guest user record access". I tried this in my sandbox and it seems to have some adverse ...
0
votes
1answer
6k views

Setting Controller Variable from JavaScript and use the Variable for a Query

I'm trying to pass a JavaScript Variable to my Controller and do a query with the value. Here's what I got (only necessary code): My Controller: public with sharing class MyClass{ public String ...
0
votes
1answer
29 views

Why does my custom metadata field defintion query not work?

I'm reading the answer to this following question: How to get a field's API name when querying a field of datatype, Metadata Relationship(Field Definition) However, when I run the following ...
0
votes
0answers
22 views

Errors for count() via Dev Console (No response from the server) and Workbench (future_get-9-1588268637)

Need to test out different grouping strategies for a matching process I'm building. Problem is there are too many records to query the data for a count(). In dev console I get a 'communication failure:...
0
votes
0answers
28 views

MC Connect with BU : Query synchronized data extensions / Salesforce data on Data designer

This is linked to the question : Filtered Data extensions or Data extensions fed with SQL queries to duplicate Synchronized DEs from CRM to share with child BUs? It seems that we can query the ...
4
votes
1answer
833 views

Display a count of records within 15 miles of a subscriber ZIP code

I have an ExactTarget question. I have a data extension of _subscribers. One of the fields is their zip_code I have another data extension of _widgets which includes the widgets' zip_code1 I also ...
0
votes
1answer
19 views

How to create a new Data Extension using Queries?

My goal is to use a master data extension which has all contacts regardless of the possibility of sending emails. So I would like to use Queries to filter this Data Extension and create a new one with ...
0
votes
1answer
49 views

Update a checkbox with a trigger

I don't know if I'm doing it right. I have to set checkboxes values to true after import new contracts, but just for the contracts that are related to an account that already has a Contract where the ...
3
votes
0answers
87 views

Why is my Salesforce-SOQL-Subquery-Query discarding entrie

UPDATE It seems that this issue only occures if the for-each-loop handles more than one entry. If the SELECT-Statement just handles one Near_By_Metadata__mdt, everything works fine and i get all ...
0
votes
2answers
69 views

Getting Wrong data in Salesforce Marekting Cloud Query

I have written the following query in my child BU to get data from subscribers. Select EmailAddress,Status,Subscriberkey,DateUnsubscribed from ent._Subscribers I am storing this records in Data ...
0
votes
1answer
29 views

Can we extract data of contacts that entered a journey and are not a part of email activity in Journey builder [duplicate]

-I am trying to extract data of contacts who entered the journey and who exit the journey as a reminder group and passed through wait by duration activity before flowing out of journey. -These ...
3
votes
2answers
283 views

SOSL FIND of Joe return John

I wrote a SOSL query: FIND {Joe} IN NAME FIELDS RETURNING Contact It returned me couple of records in which one of them had Mark John in the name field of the Contact. Reading the SOSL documentation ...
2
votes
4answers
6k views

Help with writing basic statistics query

Struggling for a while with trying to extract basic statistics of our company emails status. What we want to get is a query that will extract the following stats.: Probably taken from Send Log table:...
0
votes
1answer
1k views

How can I extract a report containing opens, clicks and email campaign name for one user?

In SFMC, how would I be able to extract a report containing the opens, clicks and the name of the related email campaign for a single user? I have read through this post already: ExactTarget - get a ...
1
vote
1answer
617 views

Conga's Nth row syntax not working

So I have a data set from a conga query called guarantors and need to reference field values from the 1st and 2nd rows. I have tried using the syntax from conga but it will not work: {{Guarantor....
0
votes
2answers
41 views

SOQL query for Multiselect picklist

Hello I'm trying to use string in SOQL query where clause for multiselect picklist. I need to get records of CustObj__c where Multipicklist__c fild have 'abc' or 'xyz' values. String str = '\'abc\',\...
0
votes
1answer
25 views

SFMC: How to add a prefix to values in a column

We are working on a use case where we needto add a prefix to our ID column. E.g. we have the real ID - e.g. 123xyz - and it shall have a prefix STAGE>> STAGE_123xyz is the final ID. Every record in ...
0
votes
1answer
23 views

How to GROUP BY + Merge values of a column together within a SFMC data extention

here is the problem I am facing. I essentially need to group and then take the values of any unique user, and combine them and delimit them out by " | " into the result for each product. Any idea how ...
0
votes
1answer
35 views

Marketing Cloud Data View Question - Query returns 0 records

Query select s.Emailaddress as 'Email_Address' , s.SubscriberID , s.subscriberkey FROM _Subscribers s JOIN _Sent se ON s.Subscriberkey = se.Subscriberkey is anything wrong with it? or is this a ...
0
votes
2answers
66 views

How to List all Custom Objects from Salesforce API?

I'm currently working to use the Salesforce REST API to get a list of all Salesforce Custom SObjects without including System or Standard Objects (like how the /services/data/vXX.X/sobjects/ does). ...
0
votes
1answer
51 views

SQL Query for getting distinct domain and count

I have a Data Extension which has email address. I want to store all distinct domains and counts of these emails in another DE For eg: I have someth@som.com, test@test.com, 123@test.com. So my o/p ...
0
votes
1answer
527 views

Help Query Spam Complaint Data

I would like to have an extracted data extension from the following tables below: _ListSubscribers _Complaint _JOB _Bounce Want to get the following and put it in a data extension using a date ...
2
votes
1answer
43 views

Why is my click data view query not delivering the results I expect?

I'm working on a setup of individual journeys triggered by clicks on certain furniture aliases. At the moment I have journeys starting when either of these aliases; 'WeLove_AlbaSidetable', '...
0
votes
0answers
35 views

Marketing Cloud data views for Journeys that do not send emails

Background My customer would like to create non-sending journey to get a better sense of the data coming into a journey, and decision logic we plan to use. We are experiencing lots of bad/dirty data, ...
0
votes
2answers
441 views

Marketing Cloud SQL Query to determine no of null columns

I am trying to execute the below query in a query activity. The intent is to find how many emails a customer record have. The query is executing without errors but the No_Of_Email column is not ...
1
vote
2answers
44 views

How to check if user has permissions to create specific object

Given User.Id, how do I check with SOAP if this user has permission to create Contact or Lead? Update: So far I've discovered only this solution: SELECT ProfileId FROM User WHERE Id='...
0
votes
1answer
23 views

Accessing query result fields

I am trying to pull values from a query result I'm performing on the Product2 sObject and am trying to save the values from the query into individual variables. My query result: |DEBUG|...

1
2 3 4 5
27