.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

Column names in each view or function must be unique. Any Suggestions Please!!!!!!!!

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :Sql Server
I am getting this error when I am executing this view. But I am not getting this Error when parsing the query!!! Can some one help me with the issue. Create   view [PosSales_Transactions_Tenders_Extract] AS SELECT RT .RTL_TRN_ID, RT .STORE_NO, RT .WORKSTATION_NO, RT .RTL_TRN_NO, RT .RTL_TRN_TYPE_CODE, RT .AMOUNT, RT .OPERATOR_NO, RT .CUSTOMER_NO, RT .EMPLOYEE_NO, RT .BUSINESS_DATE, RT .BEGIN_DATETIME, RT .END_DATETIME, TLI .LINE_ITEM_NO, TLI .TENDER_TYPE_ID, TLI .TENDER_TYPE_CODE, TLI .TENDER_AMOUNT, TLI .CHANGE_FLG, TLI .SERIAL_NO, TLI .KEYED_FLG, TLI .EXCHANGE_RATE, TLI .FOREIGN_TENDER_AMT, TE .TENDER_TYPE_ID, TE .TENDER_TYPE_DESC FROM   dbo.RETAIL_TRANSACTION RT JOIN   dbo.TENDER_LINE_ITEM TLI ON   RT.RTL_TRN_ID = TLI.RTL_TRN_ID JOIN   dbo.TENDER TE ON   TLI.TENDER_TYPE_ID = TE.TENDER_TYPE_ID WHERE   RT.VOID_FLG = 0 AND RT .VOIDED_FLG = 0 AND RT .VOIDING_FLG = 0 AND RT .SUSPENDED_FLG = 0 AND RT .TRAINING_FLG = 0 Msg 4506, Level 16, State 1, Procedure PosSales_Transactions_Tenders_Extract, Line 4 Column names in each view or function must be unique. Column name 'TENDER_TYPE_ID' in view or function 'PosSales_Transactions_Tenders_Extract' is specified more than once.

View Complete Post

More Related Resource Links

Unique text value in databse column


Hi Everyone!

I know this is probably a very basic question but how do I keep a column's text values unique in SQL server (ie for a unique username)?  The column is not an integer it's varchar(50), and it's not the primary key but I could make it the primary key if recommended.

The front end could handle it;  where the user would enter text, it's validated, then a query is done to see if that username is available.  If so, then user can decide to choose it and an insert is done, if not they pick a new username and process repeats.  With this approach, the responsibility of keeping the value unique solely rests on the front end, nothing on the database side.

Is this the correct way to handle this? 

Thank you!


dynamically change column names in Crystal reports


I need to develop 3 pages.

On the first page user defines atmost 7 column names to be displayed on the report. I'm saving these names in a Sql DB table 'Columns' with Column_Nm and Column_ID as Table columns.

On the second page I'm retrieving column_Nm from the table and displaying them on the page so that the user enters the data. This data is saved in another table 'Summary' with the Columns column1 through column7.

on the 3rd page I need to show a report of 'Summary' table.

How do I dynamically replace column1 through column7 names with that of 'Column_Nm' on the report?

Any help/suggestions would be appreciated.


Duplicate column names from forms in SharePoint lists



I'm in the process of migrating from a WSS 2 site to WSS 3/MOSS. On the old site I used an Infopath 2003 form for absence requests. During the migration I now use Infopath 2007. There wasn't any problem initially when the form was stored with the SharePoint form library. However, when I published the form as a content type from Infopath 2007 and then added that content type to the form library, there are two columns for each piece of data from the form. (One from the content type and one from the form list.) I relinked each old form (list content type) to the new AbsenceRequest content type and removed the original one from the list. However, the duplicate column names are still there. Since they came from the Infopath form, they are not editable or deletable from the SharePoint list management interface. The duplicate column names make it tough to build views since it isn't apparent which column to use in the form building UI. It can be determined form the overview display, but it is very cumbersome.


Does anyone know a way to get rid of the old, absolute, columns?

Datasheet view lookup column issue


When a column that has a lookup is empty in datasheet view and I attempt to update a different column I get this message: the text entered for isn't an item from the list. select an item from the list, or enter text that matches one of the listed items.

I found this hotfix, but it did not apply.


Any ideas how to get this resolved?

Dynamically change column names in Crystal reports - ASP.Net

Hi I am developing an application in ASP.net 3.0 and MY SQL database . I want to display column names & values in crystal report as user selects in ASP.net application  and column names and corresponding values will be changed dynamically. Any help/suggestions and sample code would be appreciated. Thanks in advance....  

How do I change the order of column names in EditForm.aspx

I have an Announcements list to which I've added extra columns: Publish (date), De-Publish (date), and Category (choice).  When I go to EditForm.aspx, the columns display in this order: Title , Body, De-Publish , Category and Publish . I'd like to change the order of the columns on EditForm.aspx so that it is Title, Body, Category, Publish and De-Publish . Changing the All Items view doesn't do it. How might I change the order of columns that is shown to the user?

Hide grid view column if empty

 Hello All, I want to hide a grid view column if that column is empty. How do I do this? I dont have much exp. with grids. Please help me. Thanks in advance.

Sharepoint Calendar export to Outlook but can only view the Title column

I have created a Calendar in Sharepoint for booking out company vehicles. The fields I have created are: Vehicle (Choice), Driver (User/Group), Start & End Times, Title (text), DisplayField (Calculated text based on Vehicle + Title...... it would be nice to include Driver but it seems Sharepoint cannot handle the User/Group datatype in a calculated field.....but I digress). I use the DisplayField calculated field in my default calendar view in Sharepoint. All is good at this point. When one connects it to Outlook (via the Action menu in Sharepoint) the calendar is added but all the entries show only the Title field. If I double click on an entry, only the title field appears - the Vehicle and Driver values are missing. When I try to create a new entry - only the Title field (plus other default Outlook fields) are available. So: How can one display a value other than Title by default, and how can I display the other columns when looking at the event detail?

Where is the document library setting "Unique file names"?

Live can be so simple if only… ;-).   When using DMS functionality unique file names must be possible. The name is an unimportant attribute when using Meta data. So why can I not choose somewhere in the document library settings something like:   ·         Generate unique filenames Or ·         Do not allow overwrite existing filenames   Maybe in the first service pack?   MS? Please, please, please  

Pipe SQL Query function into Variable with no column headings

Hello, I don't know if I'm in the right forum but could not find one for Powershell. I need to return 1 piece of data from a sql database to a variable. I don't want the column headings. Here's what I have so far:         Function GetMenuGroup ([int]$StoreID) { $SqlConnection = New-Object System.Data.SqlClient.SqlConnection $SqlConnection.ConnectionString = "Server=Servername;Database=DatabaseName;Integrated Security=True" $SqlCmd = New-Object System.Data.SqlClient.SqlCommand $SqlCmd.CommandText = "exec storedProcedure $StoreID" $SqlCmd.Connection = $SqlConnection $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter $SqlAdapter.SelectCommand = $SqlCmd $DataSet = New-Object System.Data.DataSet $SqlAdapter.Fill($DataSet)|out-null $SqlConnection.Close() $DataSet.Tables[0] } $MG=Getdata 2 |out-string Here's the results I get now - How do I return just "DatathatIreallyWant" in a string variable? I don't want the column or underline. ColumnName ------------- DataThatIreallyWant   Thank you, MG2

Problem when using calculated column as column group in a view

Hi,   I have a list with a calculated column named 'FullName', the formula is: "FirstName & " " &  LastName". I created a view group by 'FullName' column. The follow error appeared on the column:   <!-- #RENDER FAILED -->   Please help

How to pass page column value to data view parameters

Hi All, I have a page library with custom column, lets call it "FormCourseId". On that page I have data view which retrieves data from custom list filtered by page column "FormCourseId". In parameter wizard creates the following tag <ParameterBinding Name="ListCourseId" Location="Form(FormCourseId)" DefaultValue=""/> Then I try to use that parameter in XSLT of data view as a filter creteria.  <xsl:param name="CourseId"></xsl:param> It does not work for me. If I change data view parameter source from Form to Query String and pass parameter as url one it works fine. What is wrong with page column parameter binding? May be if FormCourseId column is not presented in form layout as a field(I do not need to show that field in user form of the page) it could not be treated as form parameter?

SSRS 2008 R2 Data Source View Wizard does not recognize unique key constraints on views when using O

Hi, SSRS Data Source View Wizard does recongnize Primary/Foreign Key relationships from oracle datasouce tables, but does not recognize unique key constraints on views. How can I solve this problem. Thanks

Why are square brackets needed for column names

Hi I'm just trying to get used to using Joins if anyone can please tell me why this only works if I put the column name in square brackets. I only managed to work this out because after struggling I had look at how it should look when designing a New View. This works :- SELECT FoodInv.Calories FROM (FoodInv INNER JOIN Diary ON Diary.FoodIndex = FoodInv.[Index]) WHERE Diary.Date = '2010-09-05' but this didn't if I leave out the square brackets :- SELECT FoodInv.Calories FROM (FoodInv INNER JOIN Diary ON Diary.FoodIndex = FoodInv.Index) WHERE Diary.Date = '2010-09-05' Without the brackets would generate error within the Messages window :- Msg 1018, Level 15, State 1, Line 7 Incorrect syntax near 'Index'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax. Any hints are welcome. Thank you. Matthew

How to have dynamic column names in an Excel Destination?

I have a situation where both the column names in the source (SQL) and destination (Excel) are being created dynamically. The number of columns, their positions, and datatypes remain the same. How do I change the OLE DB Source and Excel Destination meta-data to handle these changes at run-time?

Sharepoint Designer 2010 modified view breaks "hyperlinks" column and formats all hyperlinks to the

I have been trying to perform a simple task with sharepoint designer 2010 that keeps breaking one of my list colums (in the custom view that is).  Background:  I have a list that we are using to assist with Document control in our organization.  The list consists of a few columns: Document number, Title, Owner, Doc Type, and file link (hyperlink to a pdf).  When I create a new out of the box standard view, everything works as desired.  However, I need to adjust the column widths on a couple columns in SharePoint designer, which seems to break the file link column functionality (all of the hyperlinks are now formatted to go to the same document, thought the file paths in each list item are correct).  Funtionality of the file links column works perfectly, until I make a single change to the view in SharePoint designer and save.  Any insight on this issue would be greatly appriciated.  

How to link Title to it's associated page in list view without URL path column visible -bug?

I don't know if this is a bug or if I'm an idiot (or perhaps both, I'm open minded).   My site I'm developing is a site with publishing features activated where all my news stories are pages. What I want to have is a sortable list (the type hypothetically achieved using the XsltListView Web Part) the lists these pages with 3 columns visible: The Date created, the title (not the page name), and the author. The tricky part is that I would like the title, when clicked on, to take the person to the page. I'm actually almost there. I've created a new view with these specifications except for one issue. To make the title linked to the page, I have to have the column "URL Path" in my list view. When I remove this column, the titles instead all link to the root of the directory I'm in (ex: if I'm in Pages/Forms/My_List.aspx it will link to Pages/Forms/) Is this a bug, or is the URL Path required for the link to work? Is there a way to hide the column? Thanks.
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