Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    Houston, TX
    Posts
    34

    Unanswered: Simple SELECT problem

    I have a select statement that is not finding a recordset that I know is there.

    SQL_1 = "SELECT cust_id, firstname, lastname, email FROM tbl_customers WHERE email = '" & email & "'"

    Works fine on most email addresses, but on email addresses where there is a period in the name it does not find the record. The email string is being submitted via a form. Before the SQL statement above I have the request from the form.

    email = Request("email")

    Like I said, this select works fine on most email addresses. Im sure this is a formatting issue.

    If I manually type the select statement into SQL Query Analyzer it works also, but of couse I am manually typing the email address in there that contains the period in the email address.

    I have verified that the request is pulling the correct email address with the period.

    The select statement returns no records.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    if you run the query in Query Analyzer with the email address in the WHERE clause that you know is there, and it finds the row, but not when you run the query through your app, then it's not a SQL Server problem, it's an app language problem

    which app language are you using? we can move this thread to the appropriate forum
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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