Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SP not grabbing the results

Author  Topic 

redbrad0
Posting Yak Master

176 Posts

Posted - 2005-12-07 : 06:06:05
This seems like a wierd problem to me but if I run...

usp_getMetaWebValues 'domain.com'
I do not get any results. But if I just run the query that is inside the SP I do get results..
SELECT UsersJobs_ID, UsersJobs_UserID, UsersJobs_SiteID, UsersJobs_RemoveHTML, UsersJobs_KeywordSearching
FROM dbo.Users_Jobs INNER JOIN Users ON Users_Jobs.UsersJobs_UserID = Users.User_ID
WHERE (UsersJobs_SiteDomain = 'domain.com') AND (NOT (Users.User_MonthlyPayment IS NULL))



For your reference here is the SP and yes (@SiteDomain nvarchar(250) is the exact field set in the table.
CREATE procedure usp_getMetaWebValues (@SiteDomain nvarchar(250))
as
SELECT UsersJobs_ID, UsersJobs_UserID, UsersJobs_SiteID, UsersJobs_RemoveHTML, UsersJobs_KeywordSearching
FROM dbo.Users_Jobs INNER JOIN Users ON Users_Jobs.UsersJobs_UserID = Users.User_ID
WHERE (UsersJobs_SiteDomain = ' + @SiteDomain + ') AND (NOT (Users.User_MonthlyPayment IS NULL))
GO


Quality NT Web Hosting & Design

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2005-12-07 : 07:09:32
in the sproc You don't need the quotes around the @SiteDomain Paramater as it is already a nvarchar

WHERE (UsersJobs_SiteDomain = @SiteDomain)

Duane.
Go to Top of Page

redbrad0
Posting Yak Master

176 Posts

Posted - 2005-12-07 : 13:40:27
Boy i feel like a idiot now... last time i stay up so late at night trying to get things fixed.

Quality NT Web Hosting & Design
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-08 : 00:32:22
>>WHERE (UsersJobs_SiteDomain = ' + @SiteDomain + ')

Seems you tried to simulate Client Side coding

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -