Viewing 15 posts - 1 through 15 (of 18 total)
option 2, EXEC dbo.MyStoredProc '2015-01-01','2015-02-02','2015-03-03', 'ps', 't'
September 8, 2015 at 8:28 am
But I said also many times that i cant execute procedure with these parameters! This is not a problem with splitting dates! I can split dates inside the procedure and...
September 8, 2015 at 7:44 am
So please tell how to use this function to make from 3 strings only one string which I could pass to procedure and execute it somehow 😉
You have: ...
September 8, 2015 at 7:24 am
Part with dates is totally fixed. Its always list of separate dates: 'date1','date2','date3',... because these dates are passed by a parameter. For example @dates. I cant modify what is...
September 7, 2015 at 7:43 am
sgmunson (9/4/2015)
some of the things you've posted appear to be very clear, but then you'll post something that appears to be contradictory.
And now i see where...
September 7, 2015 at 12:50 am
Sean Lange (9/4/2015)
You have a variable being passed in and the contents of that variable are delimited string? .
No, I have n variables from erp system and these n variables...
September 4, 2015 at 8:20 am
I cant add or reduce quotes......... Its passed from system.... im always getting '20150106','20150101', a can add sth on beginning or end, add function or sth, but it will...
September 4, 2015 at 7:37 am
You didnt understand correctly, I can't EXECUTE procedure so modyfing it wont help
See what is underlined on my printcreen, i cant change how it is passed - im getting: 'sth1','sth2'...
September 4, 2015 at 7:24 am
Hmmm so next procedure to execute first procedure? I would prefer to avoid such step because its embedded next in erp system... What is more now we have only 2...
September 4, 2015 at 7:06 am
Cant split it in the same way because i cant execute procedure as it has wrong number of parameters then, I have to change sth during executing it because im...
September 4, 2015 at 5:39 am
Anyone? How to pass such list of dates into one parameter?:ermm:
September 4, 2015 at 3:31 am
Thank you all;) I have used DelimitedSplit8K function because i have already used it once previously 🙂
One more case. What if Im getting such parameters?
EXECUTE [dbo].[procedure]
...
September 4, 2015 at 12:52 am
If i only could put here the code, ehhh
alter procedure [dbo].[test]@multiple_weeks varchar(4000)
as
declare
@val date
create table #ps(id varchar(30),week varchar(8)[...])
declare c1 cursor for
select CONVERT(varchar,Item,112) FROM [dbo].[DelimitedSplit8K](@multiple_weeks...
August 28, 2015 at 8:44 am
Ok, know what was wrong with executing but data is also not proper :doze:
I put some PRINT commands, look at this
WeeksOnStart
20150406,20150401
val_in_cursor
2015-04-06
Warning: Null value is eliminated by an aggregate...
August 28, 2015 at 2:12 am
Viewing 15 posts - 1 through 15 (of 18 total)