English 中文(简体)
在搜查结果组内进行多次搜查(储存程序)
原标题:Multiple searches within a search result set (stored procedure)

在搜索结果中进行多次搜查,同时使用该届会议所用的所有搜索术语。

例如,我有一个表格<编码>User(UserId,userName,userAddress,userCity)。

我试图做的是,我想搜索表格中的所有栏目,例如使用用户名称(这可能会给我一个包含1个以上结果的结果)。 我想能够在再次使用新搜索词(不一定需要在搜索场拥有第一搜索期)的结果范围内进行搜索,但这次必须在第1次搜索结果组内进行搜索。 这可能会打破既定结果,直到找到所需条件。

如果我可能非常混淆我的要求,我会感到担忧。 我曾尝试过,现在还没有开始。 我尝试通过这个网站进行浏览和浏览,但可以发现我确实试图找到的东西。

最佳回答

I want to be able to search within the result-set again using a new search term [...], but this time, it must search within the result set of the 1st search .This might go on breaking down the result-set until what is required is found.

It seems to me that you have not yet understood that SQL is a declarative language, not an imperative one. And yes, there are stored procedures, but these are a procedural extension to SQL and don t alter the fact that SQL is essentially declarative.

因此,在“<>......m>确定结果之前,你不再“”,而是一劳永逸地说明所有标准,最好不采用储存程序,直到你理解非程序。

举例来说,使用多个predicates的询问(关于WHERE条款中规定的预期结果的说明)可能照此办理:

SELECT UserId FROM User
 WHERE UserName LIKE  cook% 
   AND UserAddress LIKE  sesam% 
   AND UserCity =  Hamburg ;
问题回答

暂无回答




相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

难以执行 REGEXP_SUBSTR

I m 查询Oracle 10g。 我有两张表格(样本数据见下文)。 i m 试图提取一些领域

SQL Query Shortcuts

What are some cool SQL shorthands that you know of? For example, something I learned today is you can specify to group by an index: SELECT col1, col2 FROM table GROUP BY 2 This will group by col2

PHP array callback functions for cleaning output

I have an array of output from a database. I am wondering what the cleanest way to filter the values is example array Array ( [0] => Array ( [title] => title 1 ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

Running numbers in SQL

I have a SQL-statement like this: SELECT name FROM users WHERE deleted = 0; How can i create a result set with a running number in the first row? So the result would look like this: 1 Name_1 2 ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签