不知道如何写“在哪里”和/或VWD中的陈述 [英] Don't know how to write "where" and/or statement in VWD

查看:49
本文介绍了不知道如何写“在哪里”和/或VWD中的陈述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我已经创建了一个搜索页面,这个页面是数据库,我的SQL 2008数据库有17,000本书(我有一个书店)。我的搜索页面有3个搜索框:作者,标题和关键字。我可以轻松配置VWD datalist控件以在"作者"字段中查找值,但我希望我的客户能够将搜索词输入到所有或任何方框中。我原以为应该有一个"在哪里"添加"和/或"的过程或者我错过了什么。我知道我可能需要手动编写SQL查询但不知道写什么。任何帮助都非常感激。

Hi guys. I have made a search page which is databound to my SQL 2008 database of 17,000 books (I have a bookshop). My search page has 3 search boxes: Author, Title and Keywords. I can easily configure VWD datalist control to look up values in the Author field but I want my customers to be able to enter search words into ALL or ANY of the boxes. I would have thought there should be a "where" process that adds a "and/or" or am I missing something. I know I may have to write the SQL query manually but don't know what to write. Any help much appreciated.

推荐答案

迈克,这不是真正的VWD论坛或SQL。如果我建议,您可能想在 http://forums.asp.net/ 上提出这个问题。他们有很多人在您需要合作的领域拥有广泛的专业知识。

请注意,无论您在何处查询,您都需要提供有关数据库表名,主键,外键等详细信息的更多信息,然后才能帮助您创建合适的SQL语句。此外,您还需要确保数据库已正确规范并且存在必要的密钥。只是一个建议......
欢呼,斯科特
Mike, this isn't really a VWD forum, or SQL, for that matter. If I may suggest, you will probably want to ask this question over at http://forums.asp.net/. They have a lot of folks with extensive expertise in the areas you'll need to work with.

Note that no matter where you inquire, you will need to provide more information concerning the specifics of your DB—table names, primary keys, foreign keys, etc., before anyone can help you to create a suitable SQL statement. Also, you will want to be sure that your DB is properly normalized and that the necessary keys exist. Just a suggestion...

cheers,
scott


这篇关于不知道如何写“在哪里”和/或VWD中的陈述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆