IS is not a keyword

Giggles220Giggles220 Posts: 154
edited September 13, 2007 7:59AM in SQL Prompt Previous Versions
This has become quite an annoying problem. If I try to type the following query

Select * from tablename where columnname is not null

I get the following:

SELECT * FROM tablename WHERE columnname INFORMATION_SCHEMA NOT NULL

why is the keyword IS not an option?

I used to have the same problem for AS but that seems to be fixed.

Comments

  • Similar problem happens with order by. when I type order I get a list of my colums that start with order but no option for the order keyword.
  • Similar problem happens with order by. when I type order I get a list of my colums that start with order but no option for the order keyword. also happens for the keyword in. I also get a list of columns starting with in but not the in keyword.
  • Same problem happens for OR
  • Yes, I see what you mean. We'll try to put in some better keyword support after WHERE in the next release. For the time being, the behaviour you discussed is configurable.

    Open the file (e.g. in Notepad):

    C:\Documents and Settings\Your.Name\Local Settings\Application Data\Red Gate\SQL Prompt 3\CompletionConfiguration.xml

    There will be a section called SearchCondition_ReservedWords that looks like this (but much with about 40 CustomItemCandidates, not just AND!)

    <CustomItem Name="SearchCondition_ReservedWords" ObjectType="ReservedWord">
    <CustomItemCandidate>AND</CustomItemCandidate>
    </CustomItem>

    This is the list of words that pop-up in the context you mentioned. If you were to add a few, you'd leave it looking something like:

    <CustomItem Name="SearchCondition_ReservedWords" ObjectType="ReservedWord">
    <CustomItemCandidate>AND</CustomItemCandidate>
    <CustomItemCandidate>OR</CustomItemCandidate>
    <CustomItemCandidate>IS</CustomItemCandidate>
    <CustomItemCandidate>ORDER</CustomItemCandidate>
    </CustomItem>

    This should be done while all supported SQL editors (ie Query Analyzer, SQL Server Management Studio and Visual Studio) are closed
    Jason Crease
    Red Gate Software
  • Thanks so much. I added order, and IS but or was already in there.

    OR and order will work fine as long as there are no columns that begin with OR or order.

    After adding Order and IS to te file the problem is not fixed.
  • Can you also put in some support for the keyword CASE in the select statement? Thanks
  • I agree painful , there are a couple of other too , that clash with common alias I use

    What do you use most IS or INFORM....

    Just rename them out of the way


    Edit the <information schema> short cut , make it infs or something

    Then create a shotcut is as IS

    easy peasy

    Mike
  • Will these things be fixed in a future release?? it is a real pain when you can't even type words like as, is, in and several others without then hitting the esc key to stop sql prompt. These are all very common keywords in SQL. I'm running version 3.6.0.82 and I'm still experiencing quite a bit of difficulties.
  • I don't have any problems like that, but I don't have <space> configured as a completion key because it would cause all kinds of problems like this. When I type is it shows me the INFORMATION_SCHEMA snippet, but I don't hit a completion key to trigger it.

    I suspect if you remove <space> as a completion key you will be happier with how things work, you just have to get used to using a different completion key. (I only use <.> and <tab> as completion keys.)

    Of course the other option would be to edit or delete some of the snippets to better fit your needs.
  • Bart ReadBart Read Posts: 997 Silver 1
    You could just delete the INFORMATION_SCHEMA snippet.
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Bart ReadBart Read Posts: 997 Silver 1
    There are other alternatives:

    - Disable fast snippet insertion
    - Increase the popup delay, or (as already suggested)
    - Avoid using SPACE as a completion key

    Hope one of those hits the spot.


    Thanks,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • I removed the checkbox for automatically inserting the snippet without the popup. I even changed the information schema snippet. my problem is that IS and the other keywords I suggested never show up as suggested candidates. so now with the changes when I type select * from accounts where num is I get the options for things like ismember and isnull but not just IS alone.
Sign In or Register to comment.