Derived table 'tablename' is not updatable because a column of the derived table is derived or constant.

Hi Guys,
I have a With CTE table expression ,this cte gets the value from startdate and enddate
I need to insert this startdate and enddate into a table ,while inserting into table,i got the below error,
Derived table 'Datematrix' is not updatable because a column of the derived table is derived or constant.
below is the query i used,
declare @StartDate date='01/01/2013'
declare @EndDate date='12/31/2013'
;WITH Datematrix(AllocationDate)
As
SELECT @StartDate AS AllocationDate
UNION ALL
SELECT DATEADD(D,1,AllocationDate) AS AllocationDate
FROM Datematrix WHERE AllocationDate<@EndDate
Insert into Datematrix(AllocationDate)
select * from Datematrix 
any guys update this solution.
Thanks 
Bhupesh.R

;WITH Datematrix(AllocationDate)
As
SELECT @StartDate AS AllocationDate
UNION ALL
SELECT DATEADD(D,1,AllocationDate) AS AllocationDate
FROM Datematrix WHERE AllocationDate<@EndDate
Insert into Datematrix(AllocationDate)
select * from Datematrix 
Hello,
Your CTE bases only on fix value = @StartDate , not on a table/view; here do you want to insert data to? This don't work in any way.
Olaf Helper
[ Blog] [ Xing] [ MVP]

Similar Messages

  • Nsert/Update and Add Column at the same Table and at the "same" Time

    Hello,
    I want Insert/Update and Add Column at the same Table and at the "same" Time but in different sessions.
    Example:
    At first the "insert/update" statement:
    Insert into TestTable (Testid,Value) values (1,5105);
    After that the "add" statement:
    Alter table TestTable add TestColumn number;
    - sadly now I get the message: ORA-00054: resource busy and acquire with NOWAIT specified
    "insert/update" statement:
    Insert into TestTable (Testid,Value) values (2,1135);
    After that the execute commit.
    I don't know when the first session set the commit statement so I want that the DB the "Alter Table..." statement execute if it's possible.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.
    Thanks for ideas

    Well I want to walk in the rain without and umbrella and still stay dry, but it ain't gonna happen.
    You can't run a DDL statement against a table with transactions pending. Session 2 has to wait until session commits or rollbacks (or until the session is killed). That's just the way it is.
    This makes sense if you think about it. The data dictionary has to be consistent across all sessions. If session 2 was allowed to change the table structure whilst session 1 has a pending transaction then the database is in an inconsistent state. This is easier to see if you consider the reverse situation - the ALTER TABLE statement run by session 2 does a DROP COLUMN TESTID rather than adding a column: now what should happen to session 1's INSERT statement? You have retrospectively invalidated a statement that was perfectly legal when it was executed.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.Fnord.
    Cheers, APC

  • Mac Book Software Update not working, iTune will not update because of that, iPhone 4 won't connect to iTunes because iTunes is not updated. Mac v.10.5.8, iTunes v.10.5.2, iPhone4 iOS 6

    Mac Book Software Update not working (Software Update does not have any new software for your computer at this time), my current MacBook version is 10.5.8.
    As a result I can't update iTunes, version 10.5.2  (This software requiers Mac OS X version 10.6.8 or later)
    Now when I connect my iPhone 4, version iOS 6 iTunes can't connect to iPhone (The iPhone "XXXXX's iPhone" cannot be used because it requiers iTunes version 10.6.3 or later.)
    so in a nutshell can't use iphone 4, because iTune is not updated and will not  update because Mac Book is not up to date and will not update either.
    Please help.
    Thank you
    bt465

    Welcome to Apple Support Communities
    Snow Leopard is a paid upgrade. http://support.apple.com/kb/sp575 Call Apple to buy Snow Leopard. Then, make a backup, insert the DVD and upgrade. When it finishes, open  > Software Update

  • PLEASE HELP!!! my ipod will not updat because of something up with itunes.

    My ipod nano will not update because of some reason with itunes it says when i plug it in that it is unable to update my ipod because all of the playlists selected for updating do not longer excist. and when i manually press upload it say that the disk could not be writen to or from.
    so please help me any suggestions would be very appreciated.
    thx

    Welcome to Apple Discussions!
    See this...
    hudgie: iPod cannot be updated because one or more playlist...
    btabz

  • Copying is not poss.because an entry is missing in Table TVCPL: L2, VTLA

    HEllo all,
    we just created a new condition type.
    (Re: sales order - new condition type - account assignment)
    Now when I create a new sales order and use this condition type, it is working fine. When I want to deliver the order, it gives me this error message:
    Copying is not poss.because an entry is missing in Table TVCPL: L2
    So now according to other threads in this forum, I went to copy control settings in VTLA. Now I wanted to create entry for Target delivery type L2, but the problem is, there is no target delivery type L2??? It is not in the list.
    What can I do??
    Thanks
    Anne

    Hi Raja,
    that's what I tried to do:
    I created a new entry, entered L2 for target delivery type and OR for source sls doc type.
    When saving I am getting:
    Entry L2   does not exist in TVLK - check your entry
    Thanks
    Anne

  • Copying is not poss.because an entry is missing in Table TVCPL: AF

    Good night,
    When Create outbound delivery with order reference, got an error :
    Copying is not poss.because an entry is missing in Table TVCPL: AF
    Message no. VL473
    go to t-code :VTLA
    want to create target delivery for AF but no selection for AF.
    Order transaction using TAV.
    Guru, guide me please.
    Thank you,

    Hi
    You have to create teh copy control from order to delivery process in VTLA
    You can copy the s tandard one OR to LF and then create copy control for   your new document  types.
    You have to configure at the header and item levels in this tcode. For detailed information, you can put F1 in each field and find out the purpose of each field.
    Reward if this helps.

  • Copying is not poss.because an entry is missing in Table TVCPL: ZO26

    Hi..
    In VL01N - outbound delivery , the following error occurs
    "Copying is not poss.because an entry is missing in Table TVCPL: ZO26 "
    here ZO26 - Sale doc. type
    Plz give me the solution , as soon as possible.
    Regards
    Deepa.

    Dear Friend,
    Please check you document flow settings ..
    What is understood from the error is that your item categories which are determined in the sales order are not relavent for delivery.
    While coping your item categories did you check for coping all the relavent item catwgories detminations.
    Next chech which item categories is determined and copy control settings.
    The problem here is the order documents items are not able to copy into delivery  because of your document flow setting.
    Check the same .You will be able to get the error.
    reward points if helpful,
    regards,
    Amlan Sarkar

  • Copying is not poss.because an entry is missing in Table TVCPL: Z03 Z15 Z25

    At the VL01N transaction itgives out a message of :"Copying is not poss.because an entry is missing in Table TVCPL: Z03 Z15 Z250" . I can't make the delivery even nor pass the initial screen of VL01N. Can anybody help me with brief explanations?
    Thanks in advance.

    Hi Hikmet Akcali,
    Copy Control for Delivery is not maintained in the system for Delivery type Z03 Sales Doc type Z15 and Item category Z250. Thats why you are getting this error.
    Please maintain the copy control settings in VTLA ( copy control sales doc to delivery doc)
    For this go to VTLA ( tcode) and create entry for Target delivery type Z03 and source doc type Z15 , by copying from an existing combination which is most similar to this Dely doc / sales doc combination.
    If this entry already exist then , create the entry for the Item category Z250 in the item level at VTLA. Maintain the settings like copying requirement and other field suitably.
    Save the settings and then create fresh delivery against the order.The error will not pop up.
    Thanks!

  • Copying is not poss.because an entry is missing in Table TVCPL: ZOV2 ZDV2

    Hi,
    I created  sales order and delivery for consignment purpose and for return it I create return sales order again, but at the time delivery creation the system shows me the error:
    "Copying is not poss.because an entry is missing in Table TVCPL: ZOV2 ZDV2"  Message no. VL473
    I checked VTLA and copy sales order type to delivery type with following data:
    Order requirements: 001
    Combination requirement : 051
    Header data: 001
    and copy item category REN as follow:
    order requirements: 101
    Item data: 101
    business data : 2
    but problem still remained. So I want to know how I can fix this error message?

    Dear,
    Table TVCPL is the table which is used for copy control so the error says maintain it properly and as per message
    there is error of Copy control Between Document ZOV2 to ZDV2 so I would suggest following step,
    1)Check the Item Cat.(REN) is define for delivery (ZDV2) check it out if Item Cat. (REN) determination is done in Delivery
       That is the only thing which will be missing, if stil problem exist then
    2) Do set Copy Control altogether again just copy it between RE TO LR and rename as ZOV2 and ZDV2 and retry ur process.
    AND IF U ARE DOING CONSIGNMENT PROCESS THEN LET ME KNOW AS IT REQUIRE DIFFERENT SETTING.
    Regards
    AJIT K SINGH
    HAPPY TO HELP U

  • Copying is not poss.because an entry is missing in Table TVCPL: ZOR3

    Copying is not poss.because an entry is missing in Table TVCPL: ZOR3
    Message no. VL473
    Murli

    hi
    maintain copy control for sales documents to delivery documents in VTLA
    zor3 to lf as target
    regards]

  • TRM-TM TABLE "DIFT_POS_IDENT" IS NOT UPDATED

    When I create a money market transaction, the table DIFT_POS_IDENT is not updated.
    Only the securities transactions are updated in the table. I want to know if this is the
    correct situation or I can config it in IMG.

    What is the scenario you are executing ? This table belongs to Transaction manager in the treasury module. This group might not be apt. There is a seperate group for treasury and risk.

  • LR 5 "Some import operations were not performed." Following files not updated because could not be read

    Having difficulty with LR5, can view photos on card while trying to import but receive following message "Some import operations were not performed."  "The following files were not updated because they could not be read."

    Check your destination folder in LR at the top right of the Import panel.  LR cannot copy the photos there and so when it tries to import them they aren’t there and cannot be read. 
    In other words the “cannot be read” message indicates that photos cannot be written to the destination.

  • HT1338 I'm getting a message that my Java is not updated, but when I run the update check, I'm told all is updated. Some web materials won't open because my Java is not updated. What do I do?

    I'm getting a message that my Java is not updated, but when I run the update check, I'm told all is updated. Some web materials won't open because my Java is not updated. What do I do?

    Hi Ginny,
    There are no more updates for Java from Apple for 10.5.8, the only way to get a Java upgrade is updating your OSX.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It looks like they do still have it:
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    And it's been reported that if you have a MobileMe account Apple will send one free.

  • HT1444 My programs will not update because of the current software?

    My iTunes will not update because its not supported by my software.  How do I get the program to update.

    iTunes 10 through 10.6.3 require at least Mac OS X 10.5, which requires a G4 or better Mac. Mac OS X 10.5 DVDs might be obtainable by phoning Apple and are available on sites such as Amazon or eBay.
    iTunes 10.7 and newer requires Mac OS X 10.6 or newer, which requires an Intel Mac with at least 1GB of RAM. It's available on the online Apple Store.
    (79891)

  • "Not using a pattern recognized by the GSA table invalidation mechanism" warning (many-to-many items relationships)

    Hello.
    I'm getting such warnings on server startup:
    12:57:33,241 WARN  [StoreRepository] Warning - table: store_user appears in item descriptors: store and user but not using a pattern recognized by the GSA table invalidation mechanism.  Cached values from this table will not be updated when user's properties are modified.  These properties for this table are: [storeUsers]
    12:57:33,241 WARN  [StoreRepository] Missing a src id property in item-descriptor user's table named store_user whose column-names are store_id
    12:57:33,242 WARN  [StoreRepository] Missing a dst id property in item-descriptor store's table named store_user whose column-names are user_id
    12:57:33,242 WARN  [StoreRepository] Missing a dst multi property in item-descriptor store's table named store_user whose column-name is store_id
    12:57:33,242 WARN  [StoreRepository] Warning - table: store_user appears in item descriptors: user and store but not using a pattern recognized by the GSA table invalidation mechanism.  Cached values from this table will not be updated when store's properties are modified.  These properties for this table are: [userStores]
    12:57:33,243 WARN  [StoreRepository] Missing a src id property in item-descriptor store's table named store_user whose column-names are user_id
    12:57:33,243 WARN  [StoreRepository] Missing a dst id property in item-descriptor user's table named store_user whose column-names are store_id
    12:57:33,243 WARN  [StoreRepository] Missing a dst multi property in item-descriptor user's table named store_user whose column-name is user_id
    Here's repository definition file:
    <item-descriptor name="user" id-space-name="user" display-name="User" display-property="name">
      <table name="user_tbl" type="primary" id-column-name="user_id">
           <property name="id" column-name="user_id" data-type="string" display-name="Id">
                <attribute name="uiwritable" value="false" />
                <attribute name="propertySortPriority" value="-1" />
           </property>
           <property name="name" column-name="user_name" data-type="string" display-name="Name">
                <attribute name="propertySortPriority" value="-1" />
           </property>
      </table>
      <table name="store_user" type="multi" id-column-names="user_id" multi-column-name="store_id">
           <property name="userStores" display-name="User Stores" data-type="map" column-names="email" component-data-type="string">
                <attribute name="propertySortPriority" value="-1" />
                <attribute name="uiwritable" value="false" />
           </property>
      </table>
    </item-descriptor>
    <item-descriptor name="store" id-space-name="store" display-name="Store" display-property="name">
      <table name="store_tbl" type="primary" id-column-name="store_id">
           <property name="id" column-name="store_id" data-type="string" display-name="Id">
                <attribute name="uiwritable" value="false" />
                <attribute name="propertySortPriority" value="-1" />
           </property>
           <property name="name" column-name="store_name" data-type="string" display-name="Name">
                <attribute name="propertySortPriority" value="-1" />
           </property>
      </table>
      <table name="store_user" type="multi" id-column-names="store_id" multi-column-name="user_id">
           <property name="userStores" display-name="User Stores" data-type="map" column-names="email" component-data-type="string">
                <attribute name="propertySortPriority" value="-1" />
                <attribute name="uiwritable" value="false" />
           </property>
      </table>
    </item-descriptor>
    I'll appreciate it, if someone tell me what's wrong with my definition.
    Thank you in advance,
    Jurii.

    Hi Jurii,
    You are right about ATG docs do not have info about M-M that can fit into your requirement. So we have to give it a try :-)
    Please try with the below definition to see it it works.
    user_tbl and store_tbl - no changes
    store_user table has three columns - user_id, store_id and email
    <item-descriptor name="user" id-space-name="user" display-name="User" display-property="name">
      <table name="user_tbl" type="primary" id-column-name="user_id">
           <property name="id" column-name="user_id" data-type="string" display-name="Id">
                <attribute name="uiwritable" value="false" />
                <attribute name="propertySortPriority" value="-1" />
           </property>
           <property name="name" column-name="user_name" data-type="string" display-name="Name">
                <attribute name="propertySortPriority" value="-1" />
           </property>
      </table>
      <table name="store_user" type="multi" id-column-names="user_id">
           <property name="store" display-name="Stores" data-type="set" column-names="store_id" component-item-type="store"/>
        <property name="email" display-name="User Store Email" data-type="set" column-names="email" component-data-type="string"/>
      </table>
    </item-descriptor>
    <item-descriptor name="store" id-space-name="store" display-name="Store" display-property="name">
      <table name="store_tbl" type="primary" id-column-name="store_id">
           <property name="id" column-name="store_id" data-type="string" display-name="Id">
                <attribute name="uiwritable" value="false" />
                <attribute name="propertySortPriority" value="-1" />
           </property>
           <property name="name" column-name="store_name" data-type="string" display-name="Name">
                <attribute name="propertySortPriority" value="-1" />
           </property>
      </table>
      <table name="store_user" type="multi" id-column-names="store_id">
           <property name="user" display-name="Users" data-type="set" column-names="user_id" component-item-type="user"/>
        <property name="email" display-name="User Store Email" data-type="set" column-names="email" component-data-type="string"/>
      </table>
    </item-descriptor>
    Thanks,
    Gopinath Ramasamy

Maybe you are looking for

  • Why do I need to declare "defaultButton" ? (In a component form part of view stack)

    After doing some research and some help from FlexGuy in another thread, I realize that I need to make sure I have custom components initialized before accessing parts of the component.  Just recently I was thrown for a long time when I tried to first

  • HOW TO CREATE MULTIPLE RECORDS IN A NONE DATABASE BLOCK?

    I have a Form where I have a none database block with unbound items. The block has 10 records. In the when-new-block instance I run a query by which I would like to fill up the block with data. The code fragment looks like the following: begin declar

  • Verizons lack of concern for its customers after Update Fiasco

    I, like many of you have recently gone through the fiasco that is the last update. I was awakened at 2am by my phones repeated bootloop. After 4 days of trying to get this straight with Verizon Support they finally told me it was an HTC issue and the

  • KSB1 Report Behaviour.

    Hello All, We have posted actuals from the transaction KB21N to WBS with four line items in one document with same sender CC and recevier CC being different, All the four line items have different WBS assigned, When we check the same in KSB1 transact

  • Console mp3 player, single process, thunar custom command... [SOLVED]

    Couldn't come up with a better topic title. Sorry. Anyways, I'm having a bit of a problem with console mp3 players. I want to use Thunar (I use XFCE4) to start mp3 files just by clicking on them. That's simple to fix. What I'm having a problem with t