.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error when replicating a Computed Column.

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :Sql Server


I have a table with computed column as a primary key (Order ID + Branch ID). The problem is when i try to publish the articles it gives me the following error. I need this computed column as a primary key for replication the Order_ID in different branches. Please Help.

The error message is in the following link:




View Complete Post

More Related Resource Links

Error when using Computed Column

There are 2 errors that I  get when creating computed colums (Persisted) step1 first a created a UDF and i get the follwing error Msg 4512, Level 16, State 3, Procedure UdfGetMonthlyAmount, Line 77 Cannot schema bind function 'dbo.UdfGetMonthlyAmount' because name 'Subscriber.Reference.Period' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself. It says there is a problem in this stmnt - SELECT @getFreqText = Name FROM Subscriber.Reference.Period WHERE Id = @frequencyId The UDF is as following: USE [Subscriber] GO /****** Object: UserDefinedFunction [dbo].[UdfGetMonthlyAmount] Script Date: 08/27/2010 12:55:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create FUNCTION [dbo].[UdfGetMonthlyAmount] -- #description Returns the Subscriber's customized Forecast date as defined in Subscriber table -- #tables Subscriber -- #parameter: @SubscriberId ( @frequencyId int, @amount money ) RETURNS money WITH SCHEMABINDING AS BEGIN DECLARE @getFreqText varchar(38) DECLARE @monthlyAmount money --AVG DAYS = (365/12) --AVG WEEKS DECLARE @avgDays money = 30.4167 DECLARE @avgWeeks money = 4.3452 SELECT @getFreqText = Name FROM Subscriber.Reference.Period WHERE Id = @frequencyId IF (@getFreqText = 'Daily') BEGIN SET @monthlyAmount = (SELECT ISNULL(@amount,0) * @avgDays) END ELSE I

SQL 2008 SP2: adding a "persisted computed column" creates an "Internal Query Processor Error: The q

Hi, a simple (and long-existing) stored procedure started throwing this error after adding a persisted computed column on another table that is not used in the stored procedure (but is referenced by a foreign key in the table used in the stored proc.)
Msg 8624, Level 16, State 1, Procedure pSetPersonExtraAnswer, Line 26
Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.

I think I have traced the "culprit" to the following update.
ALTER TABLE dbo.Persons ADD fullName AS (firstName + ' ' + lastName) PERSISTED

Here is the very weird thing:

If I restore the DB, immediately add the persisted computed column and run the problematic SP call, I get the error in Management Studio.

If I restore the DB, run the problematic SP call and then add the computed column, I no longer get an error from SSMS when I rerun the SP call. But, I still get it from my ASP.NET (via enterprise library) code!

When the error happens, altering the pro

Filter by Computed Column



After looking for a driver to open legacy dbf drivers to connect, the next level trouble a have is this one:

first, i can retrieve the data but when trying to filter by a parameter (somesc columns) i get an error.

The error says about the database can't determine some blah blah!

The error is a columm tha is formated (  1234  ) about  8 space, fixed. The values in the query appears like that. I resolve this by Trimming Ltrim(ColumnName) and i get this (1234).

Now in SqlExpress, how can i filter by the new Trimmed Expression? (This is a primary key that the DBF use)


SELECT column1, column2, column3


SELECT Ltrim(column1) as NewExp, column2, column3
Where NewExpre = @NewExpres                  -Error-


BDC Column validation error in DIP



I have created a content type which has a BDC column along with other columns.

This content type is used in a document library. When the user adds a new document of this content type the system is asking for the extra data required for this content type and I am using AJAX to store data in the BDC Column fields.

The adding process goes fine and I am able to check in the document

Now if I check out the document and open it to edit it, a message is shown on the top of the document saying ' Required Properties - To save to the server, correct the invalid or missing required properties' along with 'Edit Properties' button.

When I click on 'Edit Properties' DIP is opening up and the invalid column is not highlighted. After some trial and error I found out that the problem is with the BDC column. When the cut the data from BDC column and paste it again and click on 'Check Item' the error disappears and allows me to check in the document.


Did anyone face any problem like this before. If so please help me out

Also I am new to BDC so please bear with me if I am missing something obvious.



Trying to set Calendar Time Interval Using Calculated Column, but getting Error



So i was trying to use a calculated column that added 7 days to the start date of a calendar item. The calculated column worked fine because i checked with several tests. Then i tried using the Column as the End Time in the Time Interval Setting in the Calendar View. This broke Sharepoint. Not the normal graceful error im using to seeing from Sharepoint but the Server Error Page when a dump happens in a ASP page. I havent enabled the full error page because i assume its not like i can fix it, i dont have the source code.


Does anyone else experience this? If so is it a known problem and being worked on?




Bizarre Error. "Message: [Column Name]"


I'm getting a really strange error in my application when under heavy load.  The page(s) pull information from our SQL database and when this error occurs, I don't get a real error message.  Instead, the error information looks like the following:

Message: TimeZoneOffset
Source: System.Data
StackTrace: at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
at System.Data.SqlClient.SqlDataReader.get_Item(String name)
at WebReport_mb_Main.GetTimeZoneDetails() in C:\Projects\WebReport\mb_Main.aspx.cs:line 260
at WebReport_mb_Main.Page_Load(Object sender, EventArgs e) in C:\Projects\WebReport\mb_Main.aspx.cs:line 38
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

So what does this mean?  More importantly, how can I fix it?  If no one knows the answer, does anyone have any ideas for what I can do to better search for thi

Computed Column

This is the forst time i am going to work with computed columsn. Is there a way computed columns not store the data in the table? If yes, how would i build my query when creating a computed column? By using Persisted, does it mean that i am storing the values in the database or going to do calculations on the fly  Thanks

Trying to use distrib but gets error, invalid column name 'publisher'

I have a pull subscription setup between sql server standard 2005 and windows 7 sql server 2008 express. When I run the distrib exe I get the error "invalid column name 'publisher'". I have searched the internet for a solution to this problem and keep coming up empty. Can someone help me debug this error?

Datetime column with [Computed column specification] formula

i have a datetime field in my SQL Server table i dont want to add weekend dates in this column. For this reason i always have to check the calendar. how can i use [Computed column specification] formula so that i never add weekend dates?

computed column specification - When is it calculated?

on insert , select...?  It's better than Trigger? thanks.  

Cannot delete custom column in calendar list - 'unknown error'

I've created a column in a calendar list and now cannot delete it.  I've cleared all data and I still get the "Unknown Error" message when I try to delete. jan

XML Column containing single quote causes replication error

We have SQL Server 2005 transactional replication set up, and some of our tables have XML datatype columns.  We have run into an issue with the following error in the publication: Incorrect syntax near 's'. (Source: MSSQLServer, Error number: 102) Get help: http://help/102 Looking at the distribution database, I was able to extract the offending command, and it turns out that the XML column has a single quote (') embedded in it, and the command that was generated for inserting the row into the subscriber table has bad syntax because of the single quote (i.e., it is not escaped).  One interesting note is that the single quote happens to also show up in a non-XML column, and the command segment for that column was generated correctly (it was escaped). Is there a workaround / solution for this?

Error when creating PK to a column which has dupliacte columns..

The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'table name' and the index name 'PK__column__118068EB'. The duplicate key value is (D1).

Cannot delete external data list column due "Parameter name: combinedEncoded" error

Hello!   I migrated a Sharepoint 2007 to a Sharepoint 2010 by dbattach method. And now I want to delete the BDC list columns, but I'm getting this exception: System.ArgumentException:   Parameter name: combinedEncoded    at Microsoft.SharePoint.BdcClientUtil.SplitStrings(String combinedEncoded) What should I do to delete properly this columns?   Many thanks!

Duplicate column error in script

Hello, I have a new database server and I created a new database and now I'm trying to run a script that's supposed to create all the tables from the previous database server. The script is an accumulation of various changes I have made to the old database since the start of the project in order to implement a variety of features, so it has this pattern: ALTER TABLE X DROP COLUMN Y; GO and later in the file: ALTER TABLE X ADD Y int NOT NULL; GO When I run the script, I get a duplicate column error message for the table and field, although I first dropped the column and then added it again. I suppose I have to do some kind of flash after the drop and before the add, but isn't the GO supposed to do that? If not, how can I flash it in the script? Thanks.  

Error from AS2005 - Binding for column 'xxxxx' is not a ColumnBinding type

I've seen this question come up a couple times on the public .olap newsgroup, but I've never seen an answer, so I'm going to give it another try:I'm getting an error when I try to incrementally process my SSAS 2005 cube:    Errors in the high-level relational engine. The binding for the 'column-name' column is not a ColumnBinding type.In this case, the column name that's given is a name that occurs in only 1 table in the underlying schema, so I know unambiguously which column it's talking about.  The relevant part of the schema is roughly this:create table Date(    DateID int not null primary key,     /* ... */);create table File(    FileID int not null primary key,    FileDateID int not null foreign key references Date(DateID),    /* ... */);create table Fact(    /* ... */    DateID int not null foreign key references Date(DateID),    FileID int not null foreign key references File(FileID));The column that's named in the error message is File.FileDateID.  Note that this is not a pure snowflake schema - there's a "loop" that associates files with dates in addition to other date relationships within the main fact table.  I'm just guessing that the root of the problem has something to do with non-snowflake-ness of the schema.  Full processing of the database/cube works fine - it's only when I try to process incrementally or create aggregations that I get thi

Error when trying to add calculated column: ' Item has already been added. Key in dictionary:'

I created a subsite under a subsite in my MOSS 2007 site collection. Then I am trying to create a 'local' site content type for Quizzes. Next I am trying to create a calculated column and right after I specify Calculated Column as the type I get a mysterious error Now, Root Cause Analyst Name is a    Root Cause Analyst Name is a site column defined in the Root web, and referenced in the parent subsite, but it has nothing to do with my present effort. ? Can I not create content types in a sub-sub-site, or should I create them all in the root web? Here's the error:     Item has already been added. Key in dictionary: 'Root Cause Analyst Name_Root_x0020_Cause_x0020_Analyst_x0020_Name'  Key being added: 'Root Cause Analyst Name_Root_x0020_Cause_x0020_Analyst_x0020_Name'   at System.Collections.SortedList.Add(Object key, Object value)    at ASP._layouts_fldnew_aspx.__Render__control10(HtmlTextWriter __w, Control parameterContainer)    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)    at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)    at
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend