Cannot raise same error on dev server

  • I have an SQL statement that joins onto a full text catalog using containstable that returns a random banner advert that matches certain keywords passed into it from a website search.

    I know SQL 2005 is more forgiving on noise words that previous versions and where you would get a syntax error when putting 1 or / in as the search term you don't however I am getting an error raised on our production site that I cannot replicate on our dev site. Both DBs have comptability level set to 90.

    I have broken the SQL down to a basic example of

    SELECTtop 1 ba.*

    FROMtbl_BANNER_ADVERS as ba

    JOINCONTAINSTABLE

    (BANNER_ADVERTS, keywords, 'ISABOUT 1 WEIGHT(0.9)') as k

    ONba.BannerPK = k.

    JOINBANNER_LOCATIONS as bl

    ONbl.SiteFK = ba.SiteFK AND bl.ImgType = ba.ImgType

    WHERE ba.SiteFK = @SitePK AND

    ba.ImgType = @ImageTypeAND

    Live= 1 AND

    ba.ExpiryDate >= GetDate() AND

    [FileName]is not null

    ORDER BY newid() DESC

    Which gives me this error when running from QA on the live box

    Msg 7630, Level 15, State 3, Line 1

    Syntax error near '1' in the full-text search condition 'ISABOUT 1 WEIGHT(0.9)'.

    I do not get this error on the dev box I just get 0 records returned.

    I thought it would just be the compatibility level of the database or is it some other setting somewhere? Can anyone help.

    Thanks in advance for any help recieved.

  • Are both servers on the same service pack/update level?

    - 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

  • I think it must be something to do with a setting/pack or local installation setting as on my laptop at home when connecting over the VPN in management studio to dev I do not get the error but coming into work on my PC I do get the same error on dev as live. I will have to check my laptop installation config settings.

Viewing 3 posts - 1 through 2 (of 2 total)

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