Viewing 15 posts - 16 through 30 (of 49 total)
Shucks - not only do I need to learn SQL 2005, but I also need to learn to navigate this site better 🙂 Sorry about that...
December 15, 2010 at 2:12 pm
Got it Craig. here it is:
SET @Where = @Where + 'AND ProbTicketSubDept LIKE ''%'' + @_Dept + ''%'' '
All single quotes of course. Seems to be working OK....
December 15, 2010 at 12:38 pm
Hi Craig and thanks. OK, I added those single quotes like so:
SET @Where = @Where + 'AND ProbTicketSubDept LIKE ''%@_Dept%'' '
I got no errors but no records were returned...
December 15, 2010 at 11:16 am
Hi Gail - to intialize @Where, I did this right after declaring it:
SET @Where = ''
When I tried to do this:
@Where NVARCHAR(4000) = ''
I got this error message:
Cannot assign a...
December 15, 2010 at 10:32 am
Gail - you are awesome. Thanks again.
I did read and use your example on your blog as my template. Unfortunately, in the proces of making my changes, I...
December 14, 2010 at 3:00 pm
Hi Gail - got one more question for you. Here's what I now have:
ALTER PROCEDURE [dbo].[PTicketSearch]
(
@StartDate datetime = NULL,
@EndDate datetime = NULL,
@Dept nvarchar(50) = NULL,
@Submitter nvarchar(100) = NULL,
@Assigned...
December 14, 2010 at 2:25 pm
Gail - and a big thanks to you too of course. Wishing you a happy and safe holiday season with your family and happy New Year!
December 13, 2010 at 1:29 pm
Craig - thanks so much for your post today. Really appreciated and a little overwhelmed here by your going above-and-beyond with all your help - especially to an anonymous...
December 13, 2010 at 1:24 pm
Gail - I am SO sorry. Found the problem in the procedure. Like you mentioned, I MESSED UP the quotes big time. I used a combination of single/doouble which...
December 9, 2010 at 4:21 pm
ARGGHH! Sorry about that Gail! I meant single quotes... Thanks again!
December 9, 2010 at 3:55 pm
Hi Craig aand thanks again. OK, so I commented out 'execute(@SQL)' and put in 'print(@SQL)'. I got the following message:
SELECT * FROM PROBLEMTICKET WHERE 1=1 AND PROBTICKETDATE...
December 9, 2010 at 3:52 pm
Thanks Gail! OK so using NULL for the parameters returned all the records which is good. I then put in the double quotes. Now when I entered...
December 9, 2010 at 2:20 pm
Thanks GilaMonster for the link! Very interesting and helpful blog post.
December 9, 2010 at 1:40 pm
Here you go! Thanks again Craig.
ALTER PROCEDURE [dbo].[PTicketSearch]
(
@StartDate datetime,
@EndDate datetime,
@Submitter varchar(100),
@Assigned varchar(100),
@status varchar(10)
)
AS
BEGIN
DECLARE @sql...
December 9, 2010 at 1:39 pm
Thanks Craig! That's taken care of now. But when I execute the stored procedure to test like so (just trying to get ALL records from the table):
-- exec...
December 9, 2010 at 1:22 pm
Viewing 15 posts - 16 through 30 (of 49 total)