Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Excel SQL: Which functions can I use?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

19 Posts

Posted - 10/01/2012 :  09:34:55  Show Profile  Reply with Quote
I do all my SQL statements using excel VBA. I search for help with syntax and statements online, but more often than not I try to use some sweet-sounding SQL function and it comes back with:

sql0204: DATEADD in *LIBL type *N not found

Where dateadd was the latest nifty function I'm trying to use. Is there some way I can use this function? Or is there somewhere I can find an exhaustive list of available Excel VBA sql functions?

I'm also posting this question at:

Most Valuable Yak

15732 Posts

Posted - 10/01/2012 :  09:39:43  Show Profile  Visit robvolk's Homepage  Reply with Quote
Excel doesn't actually "support" SQL, nor does VBA. They offer a programming interface that lets you connect to SQL databases, and you get access to whatever functions/features that SQL product supports.

Regarding DATEADD and the error message you're getting, it looks like you're accessing an AS/400 - DB2 database, which doesn't support that function.

SQLTeam is a Microsoft SQL Server website, so we really can't help with DB2, but dbForums can:
Go to Top of Page

Starting Member

19 Posts

Posted - 10/01/2012 :  10:31:56  Show Profile  Reply with Quote
Now that points me in the right direction! The search term as400 helped me find a couple manuals:

Not completely sure which one is exactly right for me, but these should provide a rich source of possible things to try and a place to look up potential functions that don't seem to be working,
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000