Results 1 to 6 of 6

Thread: SQL Query [SOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    SQL Query [SOLVED]

    Can anybody help me with this;
    In Access I had this kind of query:
    SELECT * FROM Table1 WHERE MID(Column1, 3, 2) = MID(Column2, 3, 2)

    In SQL2000 the mid is not recognised...
    What do I do instead?
    Last edited by HWijngaarD; Apr 14th, 2005 at 05:07 AM.

  2. #2
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: SQL Query

    please advise back what this mid function is supposed to do and i might advise you back the alternative.

    the problem with me now that i don't know what this mid do


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: SQL Query

    Okay, I got the MID changed by LEFT OR RIGHT,
    Now problems show up with comparing a nvarchar with a float.
    In Access it was just VAL(Column1) = VAL(Column2)
    Column1 is text and Column2 contains an integer.
    (where the text in column1 is the same as the number in column2)

    The SQL2000 doesn't recognise the function VAL...
    Last edited by HWijngaarD; Apr 14th, 2005 at 03:55 AM.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: SQL Query

    Okay, Got it.
    Its CONVERT(INT, Column1) = Column2

    http://www.microsoft.com/resources/d...rt2/c0561.mspx

    Thanks MS

  5. #5
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: SQL Query [SOLVED]

    it's very nice that you have started and ended the thread yourself.


    you didn't even give me a chance to help

    anyway glad, u solved it out


  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    Re: SQL Query [SOLVED]

    I'm sorry... next time I'll wait okay?

Posting Permissions

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



Click Here to Expand Forum to Full Width