how can i am search the data from database?
just like google

Answers were Sorted based on User's Feedback



how can i am search the data from database? just like google..

Answer / sharifuddin

for this first design the table like the fields as

EMPNo | EMPNAME | SALARY | DETAILS

Now write the query as follows...

SELECT * FROM EMPLOYE WHERE DETAILS LIKE '%<SEARCH KEY>%'

This is the simplest query for that...

Sharif

Is This Answer Correct ?    3 Yes 0 No

how can i am search the data from database? just like google..

Answer / mahendra

note that, when datatype is string i.e. details like
mahendra, then use like this - "select * from employee
where empname like '%" & trim(txtbob.text) "&' ", i used
because to any leading space will be deleted.

if u want to find salary figure that i integer then
"select * from employee where salary >= " & trim
(txtbob.text) "&"

pl.note '%" & '&" for string


for this first design the table like the fields as

EMPNo | EMPNAME | SALARY | DETAILS

Now write the query as follows...

SELECT * FROM EMPLOYE WHERE DETAILS LIKE '%<SEARCH KEY>%'

This is the simplest query for that...

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

AJAX - explain the concept and some controls like update panel, tabcontrol etc

2 Answers   Syntel,


what is the advantage of data reader?

2 Answers  


If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?

0 Answers  


If cookies is disabled in client browser will session work ?

7 Answers   Satyam,


What is the T-SQL equivalent of IIF (immediate if/ternary operator) function of other programming languages?

1 Answers   Syntax Softtech,






Details on web.config and global.asax - just explain what are the sections will be there.

1 Answers   Syntel,


Which is faster union or union all?

0 Answers  


how to edit gridview control in asp.net2.0

1 Answers   3i Infotech,


Where session variables are stored?

0 Answers  


How does ASP.NET framework maps client side events to Server side events.?

0 Answers  


When we use cookie less session? Explain its working?

0 Answers   Sans Pareil IT Services,


What is the significance of ASP.NET routing?

0 Answers   NA,


Categories