Excel SQL: which functions can I use?

krausr79

Board Regular
Joined
Feb 12, 2012
Messages
209
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:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=179379
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Answers from the other forum:


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:
http://www.dbforums.com/db2/1637371-help-there-dateadd-function-db2.html


Now that points me in the right direction! The search term as400 helped me find a couple manuals:
http://publib.boulder.ibm.com/html/as400/v4r4/ic2924/info/db2/rbafzmst.pdf
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/db2/rbafzmst.pdf
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,
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,920
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top