SP help with data type
records. When I run the SP through VB i get a syntax error converting the
value '%' to a data type integer and when I run the sql string it works.
I have tried different ways and I am stuck. Any help is appreciated.
SP:
(@Location varchar(3),@Year integer, @Month integer,@Code varchar(2))
WHERE Location LIKE @Location + '%'
AND DATEPART(yyyy,Date1) LIKE @Year + '%'
AND DATEPART(m,Date1) LIKE @Month + '%'
AND Code LIKE @Code + '%'
SQL string:
WHERE Location LIKE ''+'%'
AND DATEPART(yyyy,Date1) LIKE ''+'%'
AND DATEPART(m,Date1) LIKE ''+'%'
AND Code LIKE ''+'%'

