Stored Procedures
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a stored procedure which needs to take the current year as input how do i achieve this?
I tried the following it works in SQL but it gives me an error in Alteryx
declare @dateToday int;
set @dateToday= Year(getDate())
exec source.procedure
@Year = @dateToday
Solved! Go to Solution.
- Labels:
- Database Connection
- Error Message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
One suggestion is to use the dynamic imput tool. Make date change
create procedure new_proc ( @from_date smalldatetime )
as
SELECT * FROM TBL_SQLSERVER_EMITIDOS where cptdat = @from_date
Dynamic input configuration:
make sure you can
[]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @rmishra
The following awesome FAQ by @DiganP will walk you through how to achieve this:
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Stored-Procedures-FAQ/ta-p/376886
Thanks
