Data type error in view expression

  • When filtering a View, I put in hyphen (TBR4100-416) I get the error 'Data type error in expression'.

    This view is used in another program. I've traced down the '-'. How can I get it to accept it. I know if I put it in 's it works but the other app will not do that. 'TBR4100-416' works.

    If I put 14011 it converts it to '14011' but with the '-' I get the error.

    thanks

  • You'll have to have single-quotes around it.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • is there a way to format it or convert it to put the 's in with out having to put them in with the filter? If I put in a number with out he hiphen it does it.

  • [font="Verdana"]While filtering, when you put '-' in between the value it compares the value with the column value and it might raise error due to mismatch datatypes of the column and the value.

    Post complete query, what you are trying to do, so that we can give you better solution.

    Mahesh[/font]

    MH-09-AM-8694

  • It is a little complicated.

    I've created a View, the view is used in a web page that queries the view. Put in the number and it returns the data.

    These are part numbers, some have the hyphens, in the site it returns nothing, when I put in the number in the view/filter, it gives me the error "Data type error in expression".

    If I put the hyphens in with the view/filter it returns the data.

    I can not put in the hyphens in the web site with the number it returns nothing.

    I'm wondering if in the script I can force the hyphens each time a number is entered?? Long shot I now.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply