Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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
3 votes
0 answers
70 views

Extract variable number of property values from a JSON Array in a Query Activity

Wondering if anyone working in SFMC/Marketing Cloud Engagement has a method for extract a variable number of array property values from a JSON string in a Data Extension row. I'm aware that the ideal ...
Adam Spriggs's user avatar
  • 30.7k
0 votes
0 answers
31 views

Querying canceled job

received an email via Alert Manager telling me a job was canceled due to a script syntax error. Not sure which email it is but when I query the Job data view for that JobID, I get 0 results. At first ...
PForsyth's user avatar
-1 votes
1 answer
74 views

SOQL write a query to find the 3rd least annualRevenue on account

eg: if I have the following annualRevenue in ascending order. 10 10 10 12 15 16 18 19 then I should get 15 as the output.
J.Rosnovski's user avatar
0 votes
1 answer
21 views

SFMC - grouping records from Data Extension into 1 adding values into new fields

I am trying to group the records from Data Extension # 1 ('Self_Insurance_Expiry_Date_Entry_Step1') into Data Extension # 2 Data Extension # 1 has 2 records with same Contact__c and ...
Luiza Zdebska's user avatar
1 vote
0 answers
46 views

Salesforce SOAP API Query Operation - Invalid Session ID Error

I am attempting to perform a SOAP query operation against the Salesforce SOAP API to retrieve data from the ConnectedApplication object. However, each time I try to execute the query, I receive an &...
mysh's user avatar
  • 11
0 votes
1 answer
116 views

Salesforce Inspector crashing when copying large results

When trying to copy the results of a query (excel, csv, or JSON format), Chrome will crash completely. The query itself will complete successfully, only when copying will the browser crash. This is ...
janp's user avatar
  • 11
1 vote
0 answers
54 views

REST API query doesn't understand custom relationship while it worked with CLI

We're trying to query our Salesforce data from another process. A colleague did a PoC with his own credentials on the CLI and got results. The query he created contains custom relations and that ...
Ashala's user avatar
  • 11
0 votes
1 answer
47 views

Temp table or table type in SOQL

I have an apex remote action. Inside of it, I want to make an SOQL query. I want to create a query that is as close as SQL: SELECT Id, Text1__c, Text2__c FROM MyCustomObj__c t1 JOIN #TempTable t2 ON ...
khoa_chung_89's user avatar
0 votes
1 answer
41 views

Child-to-Parent [Object Object] value

I have this query Opportunity__c oppPricebook = [SELECT ID, Pricebook__c FROM Opportunity__c WHERE ID = :oppID]; Id pricebookId = ...
Rawan Jibawi's user avatar
0 votes
1 answer
33 views

SFMC - SQL usecase

Write a query using SFMC Data View and save the records in data extension having Journey Name, Email, Journey Version, sent, open, bounce. (NEW DE fields: Journey_Name(text), Email(email), ...
wizard_of_salesforce's user avatar
0 votes
0 answers
32 views

Show most recent description from Activity on Account

We have a requirement to show the most recent description from the associated Tasks to the Account Page , Lightening Record Page Component ( eg: select Description from Task where Description != ...
Vin's user avatar
  • 11
1 vote
1 answer
61 views

Sendlog query is giving me only one records while there are lot of sent emails through various journeys

The query below is my Sendlog query however it gives me only one records, which makes nonsense as there are lot of other records should be popped up as emails were sent through various journeys. Can ...
손광섭's user avatar
1 vote
1 answer
59 views

Error when trying to update or insert records which are available from LIST To Data Extension using Sql Query

This is the Query I tried I am getting error stating Invalid Column Name "PhoneNumber" where I do have that Field presented in my List and Data extension also. What I am missing here, can ...
Vinu's user avatar
  • 21
2 votes
0 answers
35 views

Data Loader - Unable to Proceed beyond Edit Your Query

I'm trying to export data using Data Loader but I keep running into the same issue. This seems to be happening regardless of which object I'm trying to export data for - no matter what I select, I'm ...
Charles Burns's user avatar
0 votes
0 answers
39 views

SQL Query to update DE field when "x" hours away from date/time field which is already formatted to the correct timezone

We are working on building a journey that is extremely dependent on utilizing a date/time field (StartDateTime) to determine when emails/sms are delivered. Given the constraints in Journey Builder ...
Spencer Bard's user avatar
0 votes
1 answer
61 views

Email Address is not showing in the Query Result

I am running below SQL Query to get the details from SFMC data views but I am getting NULL values on the Email address, journey name and journey version. Please help me to get these details Below is ...
Adam Coder's user avatar
0 votes
1 answer
34 views

Get list of Accounts from Contact Email Address

Sorry, bit of a noob jumping in at the deep end. My client has multiple contacts with the same email address. Each contact is linked to a different account. Is it possible to get a list of all the ...
Sam Britton's user avatar
0 votes
1 answer
55 views

Why do I hit the 50K query limit on an object with fewer than 12K records?

I'm working with some code in a complex context that may be above my pay grade (admin who knows enough code to be dangerous). The code below is throwing a 50K query limit exception, even though the ...
C. Ogden's user avatar
0 votes
0 answers
56 views

Graphql, issue with quering parent fields when use upperBound

API version: 60 Current query with upperBound: query accounts { uiapi { query { Partner_Invoice__c(first: 200, upperBound: 5000) { edges { node { Id ...
Pavel Siarzhantau's user avatar
0 votes
0 answers
24 views

Result of the APEX method is empty outside experience builder

I'm using the following method to query articles from the Knowledge__kav object. It returns the values properly inside the community Experience builder. However when it comes to the normal page it ...
ledmatrix's user avatar
0 votes
1 answer
244 views

Cannot query ConversationEntry records for Enhanced Whatsapp Channel

Our org is migrating from Standard Whatsapp Channel to Enhanced Whatsapp Channel. We have already adapted our Einstein Bot and tested the channel succesfully. Messaging Sessions work as expected. ...
Sebastian C's user avatar
0 votes
1 answer
69 views

Bulk API to query all data too slow

I am trying to write a function in Python that can query all Salesforce Object data. I'm utilizing the salesforce_bulk Python Library. This is an overview of what I've written: def ...
aayushmishra_'s user avatar
0 votes
0 answers
22 views

BounceCategoryID from Bounce Dataview field doesn't return the right value to Boolean field

I have problems during SQL that it doesn't retrieve the right value to Boolean field. Now I extract Bounce DataView and if BounceCategoryID(number type) is 1002,1003 then retrieve 'true' to Spam field(...
Nicole Jung's user avatar
0 votes
1 answer
51 views

SOQL query on child object to retrieve parent record name

I want to run a query on the 'PermissionSetAssignment' object but I want get the name of the permission set and user instead of their ids. SELECT IsActive, Id, PermissionSetId.Name, ...
Goat123's user avatar
0 votes
1 answer
65 views

Extracting _sent data view from parent business unit via SQL query not returning all records

I am trying to extract _Sent data view records in a data extension via SQL query from the parent / enterprise business unit in SFMC. When I am running this query (expectation is that extracted data ...
kl2's user avatar
  • 343
0 votes
0 answers
26 views

Splitting Data String in Data Extension into Separate Columns Based on Delimiter

I have a data extension that contains the "Link Content" data from querying the _click data view. It returns rows of data with the url + the parameters we have in place. After the url, there ...
SFMCInTraining's user avatar
0 votes
1 answer
116 views

How to convert text data type to emailaddress data type in marketing cloud

I have a SourceDE with field name "Email" as a text data type, but this field has emailaddresses only. I am writing a Query Activity in marketing cloud to tranfer the data from SourceDE to ...
SFMC User's user avatar
0 votes
1 answer
42 views

Add/Increment a value to the target data extension field of a query activity in Marketing Cloud

I have a Data Extension with daily sendLogs and I want to get the client_id with the EmailID=XXXX and ActivityId = XXXXXXXXX and add 1 to the field N_Ciclos of "Contadores" DE (target DE). I ...
Raas's user avatar
  • 17
2 votes
1 answer
69 views

LWC .js - modify multiple fields with same prefix

I have several elements which I am showing/hiding using distinct fields defined in my .js. All of the fields start with "showEdit" and I am using various events to set these to true. I have ...
Jeff Callahan's user avatar
0 votes
1 answer
144 views

Trying to write a sql query with ssjs

I'm trying to write a SQL query dynamic with ssjs. Right now i did this code <script runat="server"> Platform.Load("core", "1.1.1"); try { var today = new Date(); ...
Magalí's user avatar
0 votes
1 answer
56 views

Marketing Cloud: Violation of PRIMARY KEY constraint. Getting this error even after fixing query with partition by

I need some help with finding an answer to this very common error. There have been many questions raised for "Violation of PRIMARY KEY constraint" and I have tested the recommended solutions....
Arpita Nandy's user avatar
1 vote
1 answer
263 views

How to restrict users accessing the Custom Metadata Type Record?

We are building a application which required a Public Custom Metadata Type. We have a Screen flow which has an LWC Component which calls an Aura Enabled Method of a public with sharing class. In this ...
S1th's user avatar
  • 143
0 votes
1 answer
199 views

I am trying to create a flow in Salesforce org that will update a custom lookup field(user) to blank when the user has been deactivated

I have created a record triggered flow: object user. I need to update the SDR2 custom field to blank, which is the lookup field to user, when the user has been deactivated. The condition I have ...
Denisa Seranllari's user avatar
3 votes
1 answer
171 views

SOSL Find query not returning Standard Profiles, only Custom

Hello! I have a lookup component that uses a dynamic query based around FIND. It works great except when querying Standard Profiles. If I search for profiles, only custom profiles are returned. ...
Tom Adam's user avatar
2 votes
1 answer
124 views

Removing 1 billion rows of a DE

As the title suggests, I need to figure out how I can remove ~1 billion rows of a Send Log data extension. I can't even change the data retention policy until the count is < 100 million. I thought ...
PForsyth's user avatar
-1 votes
1 answer
59 views

Automation for birthday adding contacts the day after instead the exact day

we're experiencing some issues with a birthday automation query. Our query runs everyday and should filter contacts from 2 DE (contacts that are celebrating their birthday on that day) and put it in a ...
lisim's user avatar
  • 1
0 votes
2 answers
289 views

Nested query works in salesforce inspector but not in request with query in url

I'am trying to get(request) Accounts with some informations from child called Services__c. When im performing query in inspector it works fine SELECT Legal_Name__c, Name, BillingCountry, (SELECT ...
B.G's user avatar
  • 23
3 votes
2 answers
230 views

How to delete emojis using SQL in Marketing Cloud

I have a Data Extension named "Jobs", where I keep records from dataview Job. My team started to use emojis in subject lines of the e-mails, so also in my table "Jobs", I have ...
Maciej Barnaś's user avatar
-1 votes
1 answer
58 views

How to check JobStatus for scheduled sends with Salesforce Data Extensions

When scheduling the email with normal data extension, we will be able to see the status of email whether it's paused or scheduled. However, we can't see/check the status of email scheduled with ...
TP0505's user avatar
  • 1
0 votes
0 answers
136 views

Salesforce Error ID: 2046021028-569681 (-1183289157)

When create a get record on Salesforce Flow with multiple case field i have this error : --> Error Occurred: This error occurred when the flow tried to look up records: An unexpected error occurred....
Jul0s's user avatar
  • 11
0 votes
2 answers
122 views

Combine two SQL queries in Salesforce Marketing Cloud

On the SMC platform, we employ two SQL queries to fetch data pertaining to a specific column. We pull data from two tables in the Data Extension. However, when attempting to merge these two queries ...
Larisa Rusinovich's user avatar
0 votes
2 answers
182 views

How to retrieve User.IsPortalEnabled info from CreatedBy field on a object like Feed Item using Apex and SOQL in Salesforce [closed]

I have used this query using TYPEOF operator in SOQL which returns me records in Workbench, but not sure how to retrieve values in actual apex code as it keeps on giving error. This is the query: ...
Sfdc's user avatar
  • 29
0 votes
1 answer
80 views

Query Returning Duplicates

Goal: Query all emails sent for particular emails with the contact information and bounce information for each. Issue: Query results contain duplicate records. Question: How can I modify the query so ...
MarquezMoore's user avatar
1 vote
1 answer
619 views

Find all instances where someone is running user

I am trying to help someone remove all instances where a specific person has left the company is the running user in Salesforce. I would not consider myself a developer by any means, however this ...
Raquel R's user avatar
0 votes
0 answers
38 views

I want to solve the Too many SOQL queries. How can I reduce the number of queries?

Multiple queries are being executed depending on the data type as follows. I want to reduce the number of queries as much as possible. What should I do? //Get contract event for(ContractInfo__c ...
aeonyet's user avatar
  • 11
7 votes
1 answer
627 views

Possible bug in SOQL LIMIT clause

I've just encountered a weird behaviour of SOQL and I wonder if it's a bug or maybe some feature I do not understand: looks like the compiler lets you add an incorrect LIMIT clause - LIMIT1 for ...
Bartosz Śliwiński's user avatar
0 votes
1 answer
122 views

Combining 3 SQL Queries into a Single Query

I'm facing a challenge with my SQL query in Marketing Cloud and would appreciate the community's help in resolving it. Recently, I created three separate Data Extensions as part of a segmentation. To ...
Mik's user avatar
  • 3
2 votes
2 answers
257 views

SOQL for ApexTrigger filtered on Name field returns no results

querying all my trigger name filtering by specific name. But no result found ? what is that I am missing ? Note: Same query works perfectly in production
Ragul's user avatar
  • 541
-1 votes
1 answer
85 views

case : check if field A exist in field B

i have a data extension with the first 3 fields : Id, Email_source1 and Email_source2. i want to create the field named X. The goal is to check if Email_source1 is in Email_source2. Does someone know ...
ayakuza91's user avatar
-1 votes
1 answer
230 views

Can I convert string to datetime in Marketing cloud's SQL?

I have string data like '20230823143306'. Is there any way to convert it to a datetime format, like '08/23/2023 02:33:06 PM', using SQL? I've heard that it might be possible to perform this conversion ...
Minkyeong Kwon's user avatar

1
2 3 4 5
35