gvim options / Settings window cannot write buftype is set e382

50

A serious case of RTFM, on my account. The top few lines explain how to edit it.

" Each "set" line shows the current value of an option (on the left).
" Hit <CR> on a "set" line to execute it.
"            A boolean option will be toggled.
"            For other options you can edit the value.
" Hit <CR> on a help line to open a help window on this option.
" Hit <CR> on an index line to jump there.
" Hit <Space> on a "set" line to refresh it.

I then pressed Enter, and my setting took affect immediately

on line 155
lines   number of lines in the display
    set lines=50
Share:
50
user1445431
Author by

user1445431

Updated on September 18, 2022

Comments

  • user1445431
    user1445431 over 1 year

    I have been working on this query for over a day now.

    From the Total column in the first query (Calls) below, I need to add or subtract the Amount number from the second table (CallsIncrease) only to the months within the date range (from StartDate to EndDate where the skill equals the skill in the query).

    I tried to create a field first with the Amount to subtract for each month, to then use it to subtract from the total.

    I tried different versions of the the sub-queries below:

    Expr1: (
      select amount 
      from (
        SELECT CallsIncrease.Skill, Sum(CallsIncrease.Amount) AS Amount
        FROM CallsIncrease
        GROUP BY CallsIncrease.Skill
      )
      where [skill]=(select [skill] from CallsIncrease)
        And [callmonth] Between (select [startdate] from CallsIncrease)
          And (select [enddate] from CallsIncrease)
    )
    
    
    Expr1: (
      SELECT Sum([%$##@_Alias].amount) AS SumOfamount
      FROM (
        SELECT CallsIncrease.Skill, Sum(CallsIncrease.Amount) AS Amount
        FROM CallsIncrease
        GROUP BY CallsIncrease.Skill)  AS [%$##@_Alias]
        GROUP BY [%$##@_Alias].skill
        HAVING ((([%$##@_Alias].skill)=forecast.skill))
    )
    

    The SQL for the Calls query:

    SELECT
      CDate(DateSerial(Year([ForecastDate]),Month([ForecastDate]),1)) AS ForecastMonth,
      Forecast.Skill,
      Sum(Forecast.NormalizedData) AS Total
    FROM Forecast
    GROUP BY CDate(DateSerial(Year([ForecastDate]),Month([ForecastDate]),1)),
      Forecast.Skill
    HAVING (((Sum(Forecast.NormalizedData)) Is Not Null));
    

    Calls Query:

    ForecastMonth   Skill               Total
    01-Jan-08   Generalist English      56541
    01-Jan-08   Generalist Spanish      868
    01-Jan-08   Public Safety English   26837
    01-Jan-08   Public Safety Spanish   401
    01-Jan-08   Total                   34584
    01-Jan-08   Utilities English       48332
    01-Jan-08   Utilities Spanish       1605
    01-Feb-08   Generalist English      52176
    

    Calls Increase Table:

    ID  EventID             Skill        StartDate  EndDate     Amount
    1   9/5/2008    Generalist English  01-Jan-08   31-Aug-08   1800
    3   7/10/2010   Generalist English  01-Jan-08   30-Jun-10   -3000
    4   12/1/2011   Generalist English  01-Jan-08   30-Nov-11   2500
    5   3/1/2013    Generalist English  01-Jan-08   28-Feb-13   200
    6   12/1/2011   Generalist Spanish  01-Jan-08   30-Nov-11   80
    7   7/1/2010    Public Safety Eng   01-Jan-08   30-Jun-10   -4700
    8   3/10/2009   Utilities English   01-Jan-08   28-Feb-09   7000
    

    I really hope this all makes sense, any help would be really appreciated.

    • Donal
      Donal over 9 years
      What RDBMS are you using? Is this MS Access?
    • user1445431
      user1445431 over 9 years
      Yes it is MS Access.