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
0answers
23 views

What is a probe query?

Recently, I've found an unknown origin value in ReportEvent logs. The documentation is inexhaustive on the subject. According to all Salesforce documentations, the ProbeQuery event report type origin ...
0
votes
0answers
23 views

Query and retrieve the fields File Object [duplicate]

We are currently in the process of migrating to the lightning interface and starting to use the Files instead of the Attachments. We have few Apex Classes where we query the Attachments, we want that ...
0
votes
1answer
32 views

SQL Query -Automation Studio [closed]

select a.Email, case when l.ListName = 'Business other marketing communications' then case when l.Status='Active' then '1' else '0' end as [...
0
votes
0answers
13 views

SOQL query to get files names related to account [duplicate]

I want to get the names of all related files in the Account object. Below is my query: SELECT Name, (SELECT Id from Attachments) FROM Account WHERE Id= '0014K00000C6b7pQAB' When I run the query, it ...
1
vote
1answer
25 views

confused while querying junction object

I am working on a batch and am writing a query but am getting confused because of the relationship... The batch is written on a junction object, Account_BOB__c, between 2 parents Account & ...
0
votes
0answers
27 views

Want to Merge following SOQL

I want TO extract all picklist values for a field in a particular object. To get Durable ID of picklist Field : SELECT DurableId FROM EntityParticle WHERE Datatype= 'picklist'and EntityDefinition....
-1
votes
1answer
23 views

Please help to write a query to fetch ListEmails sent from a Campaign? [closed]

I tried this but it did not work please help me out. SELECT Id,ListEmail FROM where Campaign
0
votes
0answers
10 views

Query on Pricebook-Manual Sharing [duplicate]

I would like to know if there's a way to export all Manual Sahrings that have been done on Pricebook records. I would like to know, for each pricebook record, with which user/role/public group has ...
0
votes
1answer
24 views

How can I merge a list and a data extension?

How can I merge Email and status from a list and data extension into another data extension? Any help would be appreciated. Thanks!
0
votes
1answer
43 views

SOQL query according to date in salesforce

My Requirement is "the records should be considered next only when they complete 12 months" and this is monthly exercise so if i query the data from database it should not include the ...
0
votes
0answers
27 views

subscriber query string preference page

is there a way to extract the preference centre query string for each subscriber using a query? The aim is to pass this string with also the email address and Subscriber key to an external mailing ...
0
votes
0answers
36 views

Bulkify Apex Code

I have an Apex code allowing me to send alerts to the Head of Service of a Business Unit. Let's say a Case is created for the Business Unit APAC, then the Head Of Service APAC(aka John Smith) receives ...
1
vote
3answers
62 views

What does apex returns when nesting selects in query

If I do this: return [select id, price__c, original_price__c, title__c, tolabel(Shipping_Option__c), ...
0
votes
2answers
41 views

Issues with validating case statement in SQL [closed]

I've created a query that pulls all data from one Data Extension (DE A) and moves it to another (DE B), renaming the fields as it goes. Now I'm adding a CASE statement to put a True/False value into a ...
0
votes
1answer
35 views

Automation Timeout

I'm facing an intermittent issue with one automation. A month ago I received a message from SFMC reporting a timeout error in one Automation, but then I re-run the automation the error doesn't show ...
0
votes
0answers
25 views

SQL - GETDATE() not working

I have two queries for identifying customers for promotion. The first target is composed of customers who did their last purchase more than 30 days from the current date and the WHERE clause works ...
0
votes
1answer
16 views

Get the owner of the file from ContentVersion? - How to Merge 2 queries

I am querying for some data on a contentversion record, and also need to get the ContentDocumentId owner. I have these 2 queries, that work. But, is there a way I can do it in a single query? Query 1 -...
1
vote
1answer
43 views

I'm not able to copy Contacts from Synchronized Data Extensions to a Sendable Data Extension

Here is my problem : I'm not able to copy some (58K) Contacts from a Synchronized Data Extension to a Sendable Standard Data Extension, with a query. Here are some elements : In my connector, I have ...
1
vote
1answer
74 views

Allow guest profile to update opportunity line Item

I am trying to setup a web hook to use along side PandaDoc to update opportunity line items once approved but the query on web hook when ran on a guest profile does not return a line item. I can run ...
1
vote
1answer
28 views

Simple query of custom object returns zero rows in developer console

I'm working in the Dev Console, trying to help out a friend who needs a custom subset of data that his useless consult can't seem to figure out. I can successfully query the standard objects, but when ...
0
votes
1answer
16 views

How can I obtain data such as name, ID, address, of the oldest contact of an account in case I have more than 1 contact?

Part of a requirement is to send the account contact details, but in case you have more than one contact you should take the oldest one ... How could you achieve this? Thanks for your help
0
votes
1answer
31 views

Update boolean field in DE if field exists in another DE

I'm trying to update a boolean field (true or false) if 'Email' and 'ID' matches in another DE. 'Email' and 'ID' can sometimes exist in both DEs but not always. I've written 2 queries for this flag to ...
0
votes
1answer
28 views

Automation of Power Query data extract (bypass login or store password) [closed]

I have a report built in Excel that links into other data sets that I can't upload to Salesforce, so I need to join the data with other sources using power query. Unfortunately I'm unable to automate ...
0
votes
2answers
28 views

SOQL Restforce INNER JOIN query

Currently trying to do an INNER JOIN on my Account and Opportunity tables and am running into the following error. I am using Restforce (SFDC maintained Ruby SDK) to run these queries against a client....
0
votes
4answers
23 views

Using Like operator with Ajax Toolkit

I am trying to use like operator in like query using Ajax toolkit, but unable to do so. I am trying this: var att_name = '%sample%'; var result = sforce.connection.query("select id, from ...
0
votes
1answer
17 views

Refer to parent object in Trigger [duplicate]

I have a trigger on Contact which gets fetches 2 custom field from account (customfieldaccount) and contact(customfieldcontact). I am having null value for the custom field on the Account object. Here ...
1
vote
2answers
259 views

What is the benefit of using Aggregate Query in Salesforce

I am wondering if there are any benefits of using Aggregate Query in Salesforce. Lets's say we have 2 code snippets here. Let's say accIdSet is a collection account Id we are working on. CODE 1 : for (...
0
votes
0answers
29 views

Rownumber() is skipping numbers in query results

I'm using a query to collect records from 5 tables, exclude records from a 6th table, and then give the results an incremental number using row_number(). But when I look through the results, some ...
0
votes
0answers
19 views

Query service can't return more than 2K ContentFolderItem records

I use standard salesforce REST API for third-party app integration with salesforce libraries, query service exactly. I know REST response can't contain more than 2000 record, so if I have total number ...
2
votes
0answers
31 views

Is this an acceptable Task query performance

I have been investigating a performance issue in a Visualforce page, with the help from Salesforce support. After a couple of months info exchange, the issue is narrowed down to the DB query time on ...
0
votes
1answer
23 views

Query one record for for a field filter

On Account object I've a text field called 'Group__c'. Let's say we have four records in account, 2 accounts with group = management and 2 accounts with group = marketing. So, here the logic I would ...
0
votes
2answers
41 views

Help with SOQL Query to fetch all records with a combination of where and Limit

I am new to Salesforce . I'm faciing an issue to form a query to use it in a Apex class . Example Query : /*Set with all the LookupField__c lookup field id's */ Set<Id> LookupField ...
0
votes
1answer
69 views

Optimizing SQL for large volumes

We're working with somewhat large sets of data, around 15M - 35M records per DE, each row with 150+ attributes. What are some ways to optimize SQL queries when handling many records? For an exaple, ...
1
vote
0answers
13 views

Help needed with SAQL fill()

I need your help with the fill() SAQL function. I have created the query below and it runs, but the fill() doesn't work (no zeros get inserted). Please let me know what I am doing wrong here. Thank ...
0
votes
0answers
14 views

Query List Views Shared With A Particular Public Group

I have a Public Group named "Random Group" created in my Org and I want to query which all List Views are shared with this particular public group. Is there a way to query this? Thanks in ...
0
votes
0answers
8 views

How to use SOQL to extract list of invalid emails from Data Extension imports?

I couldn't find any resource explaining this but I'm curious if the list of invalid email addresses identified during the import of records in data extensions are stored somewhere in Salesforce? ...
0
votes
0answers
32 views

Can't get the table's description with SOQL or Rest Api

I'm trying to get the descriptions of the tables with SOQL query or Rest Api without succes till now. Any idea about how to do this? Thank you.
0
votes
0answers
35 views

Missing fields in User object when i execute an SOQL query [duplicate]

I've noticed when I execute the following query on Workbench developerforce that some fields are missing, however, these fields appear in the schema builder. This is in a developer edition org. The ...
0
votes
1answer
19 views

Class to update Account's active__c not working

I made a class in a trailhead playground to query some opps, then the accounts, and some fields related to them. My objective was to access the Account's Active__c field and change the value from 'yes'...
0
votes
2answers
26 views

How to send to a group based on graduation year [closed]

I would like to create a data extension with all of our student population. The user would then send an email to a subset of that group based on the year that the student graduated. I am hoping ...
0
votes
0answers
28 views

Query has results in query editor but none in code

When I call the following method in code I have a valid debug for communityIds yet the query returns 0 query rows. When I run the same exact query in the query editor with the same value for ...
-1
votes
1answer
115 views

How to use Map in query - Batch Apex

public toInsertOrderBillPriceShares_Batch() { for (AccountContactRelation accountContactRelation : (List<AccountContactRelation>) Trigger.new) { String oldRoles = (Trigger.isUpdate) ?...
0
votes
1answer
34 views

EmailID and UTM Parameters in a Data Extension

We are exporting a number of data views to our data warehouse. Our data team wants to be able to build some queries off the utm parameters we use on our emails. I am able to do this using the API. /...
0
votes
0answers
24 views

Syntax Error - Einstein Analytics

getting an error trying to write a trend MoM query... Can anyone provide some assistance or maybe help improve on my query? I'm pretty new to Einstein, so, writing an advanced query is stumping me... ...
0
votes
1answer
20 views

Having an error List index out of bounds while testing contact trigger

Here is my Test class for trigger , after query for cases we get an empty list: @isTest private class TestContacts1 { static testMethod void testAddNewContact(){ Contact cont=new Contact(...
0
votes
1answer
44 views

SQL Logic not Matching Drag and Drop Filter Results

We are using a Master DE that is a combination of two Objects and tying to filter from it to generate records to meet certain criteria. When we use the drag and drop filter from the Master DE, we don’...
0
votes
1answer
22 views

Extracting Email Addresses by Domains from Multiple Data Extensions?

I am trying to extract all Verizon owned email domains from existing data extensions in SFMC and placing these subscribers into a new DE that will contain only the subscribers who use a Verizon domain....
0
votes
1answer
24 views

Query Case Record Type Name for the Parent Case of an Email Message in SF

I want to query the Case Record Type Name for the Parent Case of an Email Message. I am trying with the below query but it is not returning me the name :- select id,subject,parentid,parent....
1
vote
1answer
106 views

jsforce Bulk API query is not returning records in proper json format?

I am working on a nodejs app that uses jsforce library to query data using Bulk API and the format of data returned doesn't seem to be proper json formatted. Here is a simple reproducible example: // ...
0
votes
0answers
20 views

Unable to lock row error during Querying

We have external system which does bulk api query to salesforce to fetch the records. It often fails and after retries it is success and this is very intermittent. Unfortunately , we don't have the ...

1
2 3 4 5
29