ASP complex sql statements

Results 1 to 3 of 3

Thread: ASP complex sql statements

  1. #1
    zebedie Guest

    Default ASP complex sql statements

    Please help I am having problems performing complex query. I have database test with the following table foo, with the structure: name, id, date, price. So my table contains for example:<BR><BR>bob,7, 28/07/2001, 58<BR>jim, 4, 27/02/2001, 98<BR>bill,2, 23/07/2001, 76 <BR><BR>My query is "select * from foo where id &#062; &#039;3&#039; AND price &#062; &#039;77&#039; "<BR><BR>The query should return just jim&#039;s details but returns bob and jims details. When I run query it performs first part and seems to ignore command preceding the AND. Hope someone can help. Please email me at<BR> <BR><BR>I am wanting to select for example <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP complex sql statements

    What are the datatypes of id and price? Thar may have something to do with your query results

  3. #3
    Dave L Guest

    Default RE: ASP complex sql statements

    Your sql says that id and price are strings, to get greater than to work they should be numeric, in which case you need to take of the single quotes around 3 and 77

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts