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
11 views

I want to put susbcribers who haven't opened emails in a month or bought a subscription in three months on a re-engagement journey

I'm not too familiar with Exact Target. Do I need to create a data extension for this manually every few months? Is there a way to set this up as a triggered send so these low-engagement email ...
0
votes
2answers
25 views

Is SubscriberKey the only field you can query from a MobileConnect list?

I need to query a MobileConnect List to delete some Contact records. I created a MobileConnect List and then used automation studio to query it into a DE. This worked fine BUT is SubscriberKey the ...
0
votes
1answer
26 views

Is TriggererSendDefinitionObjectID unique for Opens?

I´m having trouble to query Opened emails from a Journey accurately. I want to keep a Data Extension with all the openings from the journey <'Homem_Casado_30_55'>, version number=2. So this is ...
0
votes
1answer
32 views

SQL: Unable to convert string to date [closed]

I have a data extension in which date is importing as text. I want to convert this text to date for segmenting the data. Here is my query, when i run this in automation I get 'Could not convert date ...
1
vote
0answers
22 views

Salesforce query for working in code for testing [duplicate]

Below is the query i want to run without using tooling api is there a way possible if not how to use tooling api in my code as i Have never used it in code apart from dev console. SELECT ...
0
votes
2answers
32 views

Pushing data from one data extension to another

In Marketing Cloud, I have two data extensions. Both Data Extensions are being populated via entries in a journey. One runs off of the contact object and the other runs off the opportunity object. The ...
0
votes
2answers
59 views

How would I retrieve data from one data extension and add it to another Data Extension? [closed]

SourceCodes are fields we assign to each email. They correspond to the email name. I need to retrieve the SourceCodes from Data Extension One (our source DE used for sending) and append them to the ...
0
votes
0answers
17 views

SQL query to find the name of the Sendable Data extension that was used to send a email

I am checking if there is a way to fetch the name of Sendable Data Extension to which the Email was being sent to using query. I have used Data Views to find the ListName. But I want get Data ...
-1
votes
1answer
24 views

SQL query to find Job ID and email name for triggered & scheduled email sends

I was trying to implement this answer given in StackExchange - Query for Emails sent in the past month, unsubscribes opens, clicks for each If you look at, “III-C. SQL Query”, Paragraph in the answer, ...
0
votes
1answer
36 views

Find the ‘total sent’ for each JOB IDs in last 1 month along with ‘list name’ it was sent to [closed]

Currently by using this query, I get the number of total_sends for a particular JOB id. But I want to modify the Query so that it shows total_sends , ListName , Date for that each job ID within a ...
0
votes
1answer
103 views

How to use SQL LEFT JOIN in Salesforce Marketing Cloud

I have questions around SQL join. I have 2 tables customer and events One customer can have optin/attend/Cancel multiple events. One customer can have Confirmed/planning/Cancel multiple Orders. now I ...
0
votes
0answers
27 views

Querying _Sent, joining to my Triggered Send DE gives me a count that is MUCH larger than my Triggered Send DE total count

I'm attempting to join my triggered send data extension to the _Sent data view. We need to pull delivery information into a DE along with the corresponding record's data payload (the data in the ...
1
vote
1answer
44 views

SQL query to find unengaged subscriber confusion

I want to exclude subscribers who have not ‘opened’ or ‘clicked’ email in last 6 months. I have the below sql query. Is this SQL query correct? Does the final results of this sql query results have ...
0
votes
1answer
34 views

Please help with a subquery that includes Order By and a second child relationship

I've learned a lot about Salesforce querying but also have a lot to learn. I hope this question is clear. I have a lookup relationship where Restrictions__c is the parent and Actions__c is the child (...
0
votes
1answer
39 views

Unable to get percentage value in SQL Marketing cloud

Everyone The below query is working fine without bounce_rate condition. When I am adding the bounce_rate it is throwing an error. Anyone please suggest on this. SELECT j.emailname, j.emailsubject, s....
1
vote
1answer
25 views

Query Plan showing incorrect Results in Dev console. Please help/Suggest

Why it is showing 2 different results when clicking on Query Plan button it shows cardinality 671 but the same query I executed it then the results are only 87 records? What exactly is the Cardinality/...
0
votes
0answers
22 views

Can't query more than 2000 records on external data source object

I understand query_all and query_more, but I can't seem to get more than 2000 records from an external data source object. I've tried this a few ways, and below is Python. Note that if I use the (...
0
votes
1answer
48 views

Build SOQL dynamic query in LWC component

Is it secure to build SOQL queries on front-end side (lwc component) and pass them to Apex for execution?
0
votes
1answer
30 views

SOQL UserName and UserRole

Line: 5, Column: 1 System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: User.UserRole In the debug statement if I add UserRole.DeveloperName i get the ...
0
votes
0answers
23 views

How to use custom metadata object to detect a list of words in an email?

I'm stuck on this project currently. A case in salesforce is created every single time a user fills in a form and this causes an email to be sent to the user. However, an issue occurs with auto-reply ...
2
votes
1answer
146 views

Querying parent-->Child-->Grand child data using salesforce API

Is it possible to query below data structure using salesforce OOTB API(Rest, Soap or Composite)? Lets assume that from account all objects below have 1:M relationship with their parents There can be ...
0
votes
0answers
27 views

What statement should I be using to pull in new data for a subscriber versus repeating data I already have in columns

I have a large data extension that I am attempting to join multiple types of data that is associated to a single subscriber. So for instance subscriber 123 could have multiple rows of data that I want ...
0
votes
2answers
47 views

Batch Apex to calculate rates based on more than 50k records

I would like to calculate rates based on sets of Opportunities returned from a query -- this query regularly returns way more than the 50k limit allowed. At a high level, I know that I can get around ...
0
votes
0answers
7 views

SOQL Query via REST API does not allow AttachedContentDocument filter for Community User only

I have added a custom field My_Field__c which is a picklist to ContentVersion. If I run the query as an admin, I can get AttachedContentDocuments via that field e.g. like so SELECT Id, Name, (SELECT ...
-2
votes
1answer
36 views

How to Query Both Createddate or UpdateDate in Opportunity?

I want to get both created date of today's Opportunity as well as the last-modified date of today's Opportunity in SOQL? how to Query that? Thanks in Advance. SELECT Id,Name,Project_ID__c,RecordType....
0
votes
1answer
17 views

Insert Error in 'Aura Components Basics - Connect to Salesforce with Server-Side Controllers

I just completed the Aura Components Basics - Connect to Salesforce with Server-Side Controllers. Wrote the code and passed the text. But upon testing it in the App Preview, I get insert errors. The ...
1
vote
1answer
15 views

Field Level Security in Mulesoft using the user's sessionId in Salesforce connector

I am trying to perform a query in Anypoint Studio on the Account standard object. In the Salesforce standard connector 'Query' configuration I implemented the use of the user's sessionId. So if this ...
1
vote
1answer
23 views

SQL Query to Combine Duplicates into New DE

I am having a hard time creating a query that takes duplicate leads located in the same Data Extension but are separated by the SW Tag field which breaks them into another row. I would like to combine ...
1
vote
1answer
17 views

Log indicates I am going over Query row limit but only pulling 153

I was hoping someone could give me some insight on why this is failing. I think it's because the Master Inventory Object is over 300 thousand records but the thing is I'm never querying even close to ...
0
votes
0answers
25 views

Error: Violation of PRIMARY KEY constraint - How can I avoid inserting changed data with same PK?

I'm having an issue with a primary key violation that is a little different than others posted. I have a Contact, who can have one or more Reservations. I need to pull a list for a Journey very ...
0
votes
1answer
30 views

how to extract all click counts per url or link name for specific jobs using data views?

I would like to use data view _CLICK to extract all a list of all clicked URLs along with the count (how many unique subscribers clicked on the link) for specific job ids. Can anyone help me with the ...
0
votes
1answer
16 views

Query Studio - Could not convert date and/or time from string data type

On one data extension, I have a DateIn field modeled as text. The value can be in one of the two formats like: 2015-06-23 16:12:04.703 8/6/2018 11:46:59 AM When I cast the field to date and use it ...
0
votes
0answers
29 views

Marketing Cloud Query not importing Contacts

I created a new campaign, added 1500 contacts. I moved into Marketing Cloud and I created a query to move data in for a single send. SELECT c.[ID] as [CID], c.[Name] as [CampaignName], cm.[FirstName] ...
0
votes
1answer
61 views

SQL query to exclude subscribers

I'm trying to pull the data from orderDE, where purchaseddate is (day - 1). if the customer only purchased a single product in a day, include him in results. If a customer purchases more than 1 ...
0
votes
1answer
55 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
1answer
41 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
15 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
29 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
30 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....
0
votes
0answers
11 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
26 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
46 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
33 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
40 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 ...
0
votes
3answers
64 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
62 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
43 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 ...
-1
votes
2answers
71 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
20 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
56 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
2 3 4 5
29