.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

Filter by Computed Column

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net


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-


View Complete Post

More Related Resource Links

How to filter the search result based on a column value?

I do have search scope scoped at a list which contains attachment. I will use this scope to search (full text search) on this list then I need to filter the result based on a column which is in the same list. How do I do that? Thank you.

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

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.  

Filter items with a date column with parameters start date and end date on a sharepoint list?

If I have alist with a view that has the columns Title, Status and Status Date and the view has some items. How Can I add a filter with two parameters, start date and end date, to only show records with status date equal to or greater than parameter start date and status date is less than or equal to parameter end date? This is a sharepoint online site and I can't create and deploy custom code, can use SPD though. Do I need to use SPD or is this something I can do in the list settings? Thanks in advance.   Edit: I had a look here http://www.endusersharepoint.com/2009/09/29/sharepoint-date-filter-filtering-a-list-by-greater-than-or-equal-to-date/ but I don't have the Date Filter web part.

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

Unable to add filter to a sharepoint DateTime Column

Hi ,I have a DateTime column in  a List. When I try to create a view the column doesnt appear in the folter Column List.When i create a calculated column out of the DateTime Column, the new calculated column appears in the Filter Column ListCan any one explain why?ThanksSrila

How to filter managed meta data column using page query string?

I have two managed term sets as follows: Articles:Downloads Projects:Downloads I am trying to use a content query web part to filter a list based on the above manged meta data column. I want to filter out only "Articles:Downloads" Scenario 1: When I edit the web part and directly set the filter option with the managed meta data column to "Articles:Downloads" it works fine. When I export the web part, in the .webpart file, the "FilterValue1" property has a value "Downloads|9096e43b-555d-4879-9acc-b4ada9ea9910". Scenario 2: I want the web part to get the filter information from query string [PageQueryString:pageType]. So I tried using these options: a) pageType=Downloads      This works but returns downloads under 'projects' as well. (i want downloads only under 'articles')  b) pageType=Articles:Downloads     Does not work and shows no records c) pageType = Downloads|9096e43b-555d-4879-9acc-b4ada9ea9910     Does not work. (This value is the same as one found in 'FilterValue1' of the static web part). c) pageType = Articles:Downloads|9096e43b-555d-4879-9acc-b4ada9ea9910     Does not work. d) pageType = 9096e43b-555d-4879-9acc-b4ada9ea9910     Does not work.   What am I missing here? Can some one please help?

how to set the computed column into inbuilt database into vs2008 ?

hi..i have designed a database into the vs 2008 mobile database.my batabase has three column column1(int),column2(int),column3(int) and i want to set the value of val(column3)=val(column1)+val(column2);how and where to set the computed column value.

Binding a computed value to datagrid column

Hi, I have a WPF Datagrid with tree colums (A, B,C) which are bound to an Observable collection. The value of C is C=A+B. The value of A and B are updated via an event that I have subscribed to ( a realtime data feed). What is the best way to update the value of C each and every time A or B get chaged ? I'm new to WPF and should I use a converter to achive this ? Thanks V

Steps to alter function used as computed column

What is the best way to change a function that is currently being referenced from a calculated column in a table?  I get the following error when I try to alter it.   Msg 3729, Level 16, State 3, Procedure fn_sdtAcctJoin2, Line 232 Cannot ALTER 'dbo.fn_sdtAcctJoin2' because it is being referenced by object 'tblMembers'.

Using Filter in SharePoint FormField Lookup Column


I have a FormField lookup column with multiselect, which is bound to a List.

I have a new requirement.. There will be a textbox and a filter button above the FormField and when ever the user enter something and click on the filter button, the FormField lookup value should be filtered depending upon the string value in the textbox.

Please help me if somebody already done something like this or if someone has some idea how to do it..

Filter DFWP by passing Form Column


Hi All,

Apologies for a ridiculous problem, but it's one I can't get past.

I have two lists:

Shops - this contains Shop addresses and Shop numbers. The Shop Number column has an underlying Field name of "Title". This is NOT the auto-gen ID column incidentally, it is a Text field that happens to contains numbers of shops.

Faults - this contains calls logged to each Shop - the user chooses a Shop Number (lookup column to Shops list) and then types the fault details.

I want user to be able to see Faults logged against each Shop when they view the Shop list item.

So I am editing the DispForm.aspx page for Shops, where I've added a DFWP containing fields from the Faults list.

How do I show only those items in the Faults list, where the Shop Number on the FAULTS list equals the Shop Number of the currently-displayed SHOPS list?

I've tried:

Creating a parameter Query String for ID - but that won't work because the ID passed in the URL is NOT the "Shop Number"

Creating a parameter From field - but what do I type to reference the Shop list and the Shop Number ("Title") column?

Creating a Filter? I've tried several, but I have no way to reference the Shop Number ("Title") column on the form.

I've created a Custom List for Shops, and dro

Column filter in datasheet view


Good day.

I have SharePoint 2007 installed. Im trying to filter rows in datasheet view. When i select first of columns and choose value from drop-down menu, it filters rows by this value of this column. I do same thing on second column, its works fine. But when i try to use filter on third column its displaying empy sheet, or sheet with not all rows. I meen, that i try to apply three filters on three different columns in time and its showing wrong result. Do anyone knows what the problem is?

Best regards,


how do i get a value of a column in the cube based on a filter at runtime?

Hi, I am a newbie to the cube development and definately MDX, though I’ve managed to create an basic inventory cube which includes sales and purchase tables.


But, I am stuck at a problem which I couldn't resolve without your help;


Say, I need to show SUM of a column [CostAmountPhysical] for a company and warehouse.

The query in SQL would be:


SELECT     ItemId

Third Party Filtered Lookup is showing RENDER FAILED on clicking to sort Lookup Filter Column.



i know this isn't a Microsoft Plug-in, but I have downloaded and installed the following third party control for WSS 3.0 (Not MOSS). 


Has anyone had this problem. For some reason when I try and sort on a "Filtered Lookup" field I get RENDER FAILED. The column is in my Document Library that has 2,462 documents.

I need to switch off sort on it if possible. I have tried doing with JQuery (using Web Content Web Part), but no luck. 

Can anyone help as this is so important - even if someone can tell me where to start looking in the database. Could it be an incorrect/corrupt link in database or XML Schema File?

Your help would be really appreciated in this hour of need.



computed column to update it with max(value)+1


HI ,

  i have a column match_id up till now i have inserted values in it,now i have to make it a computed column with formula on it.

   now i am not going to insert the value for match_id column ,insted of that when i insert a row in that table then value of match_id column should be max(match_id)+1 .

foe eg.

a  b   match_id

1 2  1200

4 3  1201

8 9  1202

now  when i iniser a=12 and b=56 then match_id should calculated as max(match_id)+1 i.e

1202+1=1203 ,i had already  used identity column so tell me how to achive it???




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