Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)

  • RE: Parameter conversion

    option 2, EXEC dbo.MyStoredProc '2015-01-01','2015-02-02','2015-03-03', 'ps', 't'

  • RE: Parameter conversion

    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...

  • RE: Parameter conversion

    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: ...

  • RE: Parameter conversion

    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...

  • RE: Parameter conversion

    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...

  • RE: Parameter conversion

    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...

  • RE: Parameter conversion

    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...

  • RE: Parameter conversion

    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'...

  • RE: Parameter conversion

    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...

  • RE: Parameter conversion

    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...

  • RE: Parameter conversion

    Anyone? How to pass such list of dates into one parameter?:ermm:

  • RE: Parameter conversion

    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]

    ...

  • RE: Parameter conversion

    Thanks for such a fast reply! 🙂

  • RE: Execute procedure in procedure?

    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...

  • RE: Execute procedure in procedure?

    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...

Viewing 15 posts - 1 through 15 (of 18 total)