How to filter in a Stored Procedure specific records.

I need to get rido of some of the records through the Stored Procedure before they even hit the report. They are in the top of the list and at the very bottom. I need to remove 000000 and the INV , R13 , ZRW. Anything that starts with a 4 can stay. All others need to go.

Is there a simple way to only show those values that start with a "4" on the field.

The records come from two different databases. One field Prod_cat and another comes from Prd_gltype and they are dumped into a temp table and then reported on in Crystal Reports. I do not know if that matters.
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>Is there a simple way to only show those values that start with a "4" on the field.
Copy-paste the Stored Procedure's T-SQL into this question.
Ultimately it'll be a WHERE clause that goes something like this..

WHERE LEFT(group_code, 1) = '4'

Also, let us know if this is a permanent filter, or user-selectable.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If you are not able to alter the existing stored procedure due to business reasons, create a wrapper stored procedure, call actual stored procedure from within your wrapper stored procedure and store the results into some temp table then select all records from temp table except ones that you don't want.
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
It is a permanent filter. User will not select this one.
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
That got it thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.