Getdate() Generate error in SQL to Marketing cloud

  • 38Views
  • Last Post 26 March 2018
0
votes
Avanxo Colomba posted this 22 March 2018

Hi

How could I use getdate() in sentences sql to Marketing cloud,?

I tried getdate() but this generated error

 

Thanks for your help

Order By: Standard | Newest | Votes
0
votes
Mariia Zaharova posted this 23 March 2018

If we understood you correctly, you want use getdate() funtion in Skyvia Query Tool when quering data from your Salesforce Marketing Cloud instance. Correct?

Please try using this solution:

SELECT t.Name

  FROM Account AS t

  where t.CreatedDate <  date('now')

 

Please notify us about the results.

 

Best regards,

Mariia

0
votes
Edwin yesid Ariza Sarmiento posted this 23 March 2018

Hi 

 

Thanks for your help and reply 

 

The sentence date(´now)  work in Skyvia Query Tool but at this moment, this is not work in Marketing cloud, the error generated " unknown the function date".

 

why do the sentence getdate() in Skyvia Query Tool not work?

 

 

0
votes
Avanxo Colomba posted this 23 March 2018

Hi 

 

Thanks for your help and reply 

 

The sentence date(´now)  work in Skyvia Query Tool but at this moment, this is not work in Marketing cloud, the error generated " unknown the function date".

 

why do the sentence getdate() in Skyvia Query Tool not work?

 

0
votes
Mariia Zaharova posted this 26 March 2018

this is not work in Marketing cloud, the error generated " unknown the function date".

Please specify where exactly you are trying to execute your SQL query? 

 

The sentence date(´now)  work in Skyvia Query Tool

why do the sentence getdate() in Skyvia Query Tool not work?

Skyvia Query Tool uses its own SQL syntax for query execution (it is based on SQLite) and, thus, you should use date() function instead of the getdate() one. Please refer to: https://skyvia.com/resources/docs/index.html?select.htm

Close