AnswerBun.com

How treat columns with colons in SQL

What is the correct syntax in SQL so that it accepts colons in my column names?

I’m trying to query a Data Extension that was created from a Journey’s Salesforce Data Entry source. Consequently, the column names include colons by default.

Below is an example of a portion of the query. I’ve tried with validating the columns with [], with ”, and without anything at all, but it’s serving me up validation errors – mainly "Errors: Incorrect syntax near ‘Request__c:’."

SELECT
  [request.Request__c:Id]
, request.Request__c:Booker_Contact__r:Email
, 'request.Request__c:Booker_Contact__r:FirstName' 

FROM Request_Adjustment_Master_Homelike adjustment

Salesforce Asked by Greg Beazley on December 30, 2020

1 Answers

One Answer

I just tested this syntax and it works

Select [Contact:Id], 
[Contact:LastName], 
[Contact:et4ae5__HasOptedOutOfMobile__c]
from [syntaxtest - 2017-07-14T152814271]

So simply put brackets around any field with a :

Correct answer by EazyE on December 30, 2020

Add your own answers!

Related Questions

Apex Metadata API retrieve PageLayout assigned to Profile

1  Asked on November 20, 2021 by michael-yocca

   

Salesforce Integration User

1  Asked on November 20, 2021 by sheo-agarwal

   

Einstein intent – training dataset error

1  Asked on November 19, 2021 by wilson-kwok

     

Expression Functions for Lightning Web Components

5  Asked on November 19, 2021 by oleh-berehovskyi

   

how to make phone field unique

2  Asked on November 19, 2021 by pranav-mandlik

         

SOQL For Update to Release Locks

1  Asked on November 19, 2021 by jair

   

Emojis in Salesforce Community is not working

0  Asked on November 19, 2021 by nevrekar_amey

 

How to Blank Date value in Date formula field?

1  Asked on November 19, 2021 by sfdcprgmr

         

lightning:select selected value is not set

3  Asked on November 17, 2021 by xl-zhang

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.