Question:
Problem in SQL stored procedure..?
Moнѕιη
2012-12-26 20:51:09 UTC
Ok, here is the store procedure I have. http://pastebin.com/58yVqxxW
It works all the time however sometimes some SROs do not meet the requirement of the select statements and that's why they do not show up on the results (from the query) please go through it and tell me whats the error or do i need to modify the procedure??...Please correct the code if you can but remember it works 98% of times however it misses some SRO's sometimes...
and I will choose best answer!
Four answers:
zgraf
2012-12-28 01:40:29 UTC
Geez man. You're asking quite a lot. I'm a SQL Server DBA, but do you see how LONG that procedure of yours is? And what do your tables look like -- you didn't give us any details? I see you're using linked servers too!

It would take someone a long time to go through your proc. and try to figure out what your problem is. You may want to >> PAY << a professional to assist you, if you are unable to figure out the problem yourself. C'mon man! I doubt anyone is going to want to give you a solution for free.
Todd
2012-12-27 15:49:52 UTC
I would very much like to know when stored procedures were in anyway connected to standardized SQL other than being an add-on. I assure you that stored procedures have never been designed to be cross-platform. I can only guess that you must be using a specific platform that you didn't mention in your question. Stored procs are supposed to be used as a last resort.
pruitte
2016-10-21 06:05:13 UTC
i imagine you want a the position clause contained in the IF fact: If Exists (pick LoginUserID From LoginUser the position LoginUserID = @LoginUserID and LoginUserPwd = @LoginUserPwd) in case you do not have the the position clause you get really some files back, so the IF fact will be genuine as long as there is one row. the subsequent element I word is this: IF @@Rowcount < a million pick @LoginUserID = 0 end @LoginUserID isn't an output parameter, so placing it to 0 does not some thing. ultimately, i'd attempt to not use multiple go back statements. it really is undesirable practice. declare an integer variable interior your technique to carry your go back code. T-sq. is a exciting language. keep it up, it would not look undesirable.
TheMadProfessor
2012-12-27 08:43:44 UTC
I don't understand the problem. If an SRO doesn't meet criteria, then why would you expect it to show up?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...