You named the variable the same as the field. In the query suburb is first sought in the scope of the query, and it matches the field suburb even though it doesn't use the pp table alias.
You named the variable the same as the field. In the query, suburb is first sought in the scope of the query, and it matches the field suburb even though it doesn't use the pp table alias. So you're actually comparing the field with itself, therefore getting all records (where suburb is NOT NULL, that is).
The procedure parameter isn't used in the query at all. The solution: change the name of the procedure parameter. To prevent errors like this, I always use P_ as a prefix for procedure/function parameters and V_ as a prefix for local variables.
This way, they never mingle with field names.
If I change the suburb to vsuburb , I get 0 as the total count. – shakur007 Oct 14 '11 at 8:33 Then, the value passed in vsuburb is incorrect too. Note that searches are case sensitive.
There must be an exact match. If in doubt, please modify your question and add the new procedure, and the code that calls it (including the value that is passed). – GolezTrol Oct 14 '11 at 9:11 I see your edit and I think I know the (or 'a') problem: if you use count(pp.
Pno), pp. Pno must not be NULL, otherwise count returns 0. Change it to * or to a constant value like 1 or 'x', unless you want to count only the records where the value is not null indeed.
– GolezTrol Oct 14 '11 at 13:47 Also note that location is a reserved word, although I don't know exactly if it could be used here. Please try a different name or add a prefix like I suggested before. – GolezTrol Oct 14 '11 at 13:50.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.