0

how to create the sqlite function in objective c. call the function for inserting the query.

CREATE FUNCTION dbo.ListDates
(
     @StartDate    DATETIME  
    ,@EndDate      DATETIME
)
RETURNS
@DateList table
(
    Date datetime
)
AS
BEGIN

/*add some validation logic of your own to make sure that the inputs are sound.Adjust the rest as needed*/

  INSERT INTO
    @DateList
  SELECT FLD_Date FROM TableOfDates (NOLOCK) WHERE FLD_Date >= @StartDate AND FLD_Date <= @EndDate
  RETURN
END
2
  • 1
    SQLite doesn't do stored procedures. Is there any reason why it has to be a stored procedure, rather than just writing Objective-C code to insert these records? Commented Aug 10, 2016 at 9:33
  • Thank you Rob, i go for query. Commented Aug 10, 2016 at 10:19

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.