SQL COMMAND IN ASP

Results 1 to 3 of 3

Thread: SQL COMMAND IN ASP

  1. #1
    Join Date
    Dec 1969
    Posts
    613

    Default SQL COMMAND IN ASP

    I&#039m having trouble with this select statement<BR><BR>SELECT * FROM DLR WHERE job_num LIKE "&#039&28&&#039"*"<BR><BR>I WANT TO SELECT AND USE IN AN ASP FILE ALL ROWS ALL COLUMNS FROM TABLE DLR<BR>WHERE job_num STARTS WITH 28 . ANY HELP WOULD BE APPRECIATED, THX<BR>SCOTT

  2. #2
    STEPHEN S. Guest

    Default RE: Did you try where the wild card symbol %

    Hi Scott,<BR>From what you described, I&#039m guessing that the job_num field contains numbers such as 28000, 28001, 28004.<BR>If my assumption is correct, then I think you should try to use the syntax WHERE job_num LIKE &#039 28%&#039<BR>-------<BR>If the job_num field has numbers like this : 002800, 00288347<BR>then try the syntax WHERE job_num &#039%28%&#039 <BR>According to the rules of SQL syntax, the % is a wild card that you can use when using like. I don&#039t know how this will work in the ASP environment. Try it and tell me what happens.<BR><BR>Sincerely Yours,<BR>Stephen<BR>MrHitmaker@aol.com

  3. #3
    Join Date
    Dec 1969
    Posts
    613

    Default RE: The wild card symbol % works except

    Thx Stephen your assumption was correct, it works great when using the syntax WHERE job_num LIKE &#039 28%&#039 but when I tried the syntax WHERE job_num &#039%28%&#039 <BR>I kept getting syntax errors.<BR>I&#039m not to concerned since I will not, for time being use data that&#039s like 0028000. thanks again for your help.<BR>scott

Posting Permissions

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