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 2005 Forums
 Transact-SQL (2005)
 Help with SQL query

Author  Topic 

rockstar283
Yak Posting Veteran

96 Posts

Posted - 2011-07-01 : 15:20:40
I have 4 parameters in the report e.g. id,emp_name,emp_dept,emp_loc with a textbox for each of them..

now the report should be generated using the search string created by values entered into these four textboxes using wild cards..

e.g.

if user enters emp_id as 1 then select * from employee where id like (%1%)

if user enters emp_dept as 'sales' then select * from employee where emp_dept like (%'sales'%)

now user can enter emp_name and emp_dept or any other combination or also all the four attributes..so search string needs to be configured accordingly..can somebody please suggest me how to do this..pls

really need ur help guys.. :(

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-07-01 : 15:23:58
Duplicate topic, locking this. Please do not post your question in more than one forum. It is completely unnecessary.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -