Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7559113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:33:11+00:00 2026-05-30T12:33:11+00:00

We use the DBAmp for integrating Salesforce.com with SQL Server (which basically adds a

  • 0

We use the DBAmp for integrating Salesforce.com with SQL Server (which basically adds a linked server), and are running queries against our SF data using OPENQUERY.

I’m trying to do some reporting against opportunities and want to return the created date of the opportunity in the opportunity owners local date time (i.e. the date time the user will see in salesforce).

Our dbamp configuration forces the dates to be UTC.

I stumbled across a date function (in the Salesforce documentation) that I thought might be some help, but I get an error when I try an use it so can’t prove it, below is the example useage for the convertTimezone function:

SELECT HOUR_IN_DAY(convertTimezone(CreatedDate)), SUM(Amount)
FROM Opportunity
GROUP BY HOUR_IN_DAY(convertTimezone(CreatedDate))

Below is the error returned:

OLE DB provider “DBAmp.DBAmp” for linked server “SALESFORCE” returned message “Error 13005 : Error translating SQL statement: line 1:37: expecting “from”, found ‘(‘”.
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider “DBAmp.DBAmp” for linked server “SALESFORCE”.

Can you not use SOQL functions in OPENQUERY as below?

SELECT
    *
FROM
    OPENQUERY(SALESFORCE,'
        SELECT HOUR_IN_DAY(convertTimezone(CreatedDate)), SUM(Amount) 
        FROM Opportunity 
        GROUP BY HOUR_IN_DAY(convertTimezone(CreatedDate))')

UPDATE:

I’ve just had some correspondence with Bill Emerson (I believe he is the creator of the DBAmp Integration Tool):

You should be able to use SOQL functions so I am not sure why you are
getting the parsing failure. I’ll setup a test case and report back.

I’ll update the post again when I hear back. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:33:13+00:00Added an answer on May 30, 2026 at 12:33 pm

    A new version of DBAmp (2.14.4) has just been released that fixes the issue with using ConvertTimezone in openquery.

    Version 2.14.4

    • Code modified for better memory utilization
    • Added support for API 24.0 (SPRING 12)
    • Fixed issue with embedded question marks in string literals
    • Fixed issue with using ConvertTimezone in openquery
    • Fixed issue with “Invalid Numeric” when using aggregate functions in openquery
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I develop desktop-based WPF-application, that uses SQL Server 2008 R2 Database and ADO.NET Entity
use PHP and MySQL and want to use SELECT statement which date_post(datetime variable) start
Firstly I'm a complete newbie when it comes to SQL Server. I have five
Use Html element SELECT in aspx page like: <SELECT id=MySelection name=MySelection runat=server DataValueField=ID DataTextField=Name></SELECT>
I am tring to use http://code.google.com/p/dbmapper/ and I am not sure how to run
Use: The user searches for a partial postcode such as 'RG20' which should then
Use http://jobs.sitesixteen.com/ for reference. I'm using YQL for the city, state auto-complete. IF you
Use case: we have some project meta-data files which we want tracked, but are
use Parallel::ForkManager; use LWP::Simple; my $pm=new Parallel::ForkManager(10); our $a =0; @LINK=( 10,203, 20, 20
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.