Problem with SQL

Results 1 to 3 of 3

Thread: Problem with SQL

  1. #1
    Greg Strutton Guest

    Default Problem with SQL

    Hi,<BR>I have a problem with the syntax of SQL. I need to pull information out of a table were a selected field has information in it, ignoring null fields. To show what I mean this is the SQL I&#039m using which doesn&#039t work.<BR><BR>strSQL = "SELECT * FROM faq_uk WHERE &#039" & strsearch & "&#039 &#060;&#062; &#039NULL&#039;"<BR><BR>strsearch is the field I want and is collected from the querystring.<BR><BR>Is this wrong? and is there a better way of doing this?<BR><BR>Hope I&#039ve made sense<BR><BR>Greg

  2. #2
    Athens Guest

    Default RE: Problem with SQL

    strSQL = "SELECT * FROM faq_uk WHERE " & strsearch & " IS NOT NULL"

  3. #3
    Greg Strutton Guest

    Default RE: Problem with SQL

    Cheers Athens<BR><BR>It was sooo obvious<BR><BR>Doh!<BR><BR>Thanks<BR><BR>Greg

Posting Permissions

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