Search Results

Search found 12215 results on 489 pages for 'identity column'.

Page 60/489 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Sort a GridView Column related to other Table

    - by Tim
    Hello, i have a GridView bound to a DataView. Some columns in the DataView's table are foreignkeys to related tables(f.e. Customer). I want to enable sorting for these columns too, but all i can do is sorting the foreignkey(fiCustomer) and not the CustomerName. I have tried this without success(" Cannot find column ERP_Customer.CustomerName "): <asp:TemplateField HeaderText="Customer" SortExpression="ERP_Customer.CustomerName" > A tried also the DataViewManager, but i've a problem to detect the table to sort: Dim viewManager As New DataViewManager(Me.dsERP) viewManager.DataViewSettings(dsERP.ERP_Charge).RowFilter = filter viewManager.DataViewSettings(dsERP.ERP_Charge).Sort = sort 'sort is the GridView's SortExpression Me.GrdCharge.DataSource = viewManager.CreateDataView(dsERP.ERP_Charge) I have to apply the sort on a distinct table of the DataViewManager, but this table would differ on the related tables. I have bound the TemplateColumns in Codebehind in RowDataBound-Event f.e.: Dim LblCustomer As Label = DirectCast(e.Row.FindControl("LblCustomer"), Label) LblCustomer.Text = drCharge.ERP_CustomerRow.CustomerName 'drCharge inherits DataRow What is the recommended way to sort a GridView on columns related to another table?

    Read the article

  • Validating Column Data Stored as CSV Against Another Table

    - by Jakkwylde
    I wanted to see what some suggested approaches would be to validate a field that is stored as a CSV against a table containing appropriate values. Althought it would be desired, it is NOT an option to split the CSV list into another related table. In the example data below I would be trying to capture the code 99 for widget A. Below is an example data representation. Table: Widgets WidgetName WidgetCodeList A 1, 2, 3 B 1 C 2, 3 D 99 Table: WidgetCodes WidgetCode 1 2 3 An earlier approach was to query the CSV column as rows using various string manipulations and CONNECT_BY_LEVEL however the performance was not acceptible.

    Read the article

  • Storing object as a column in LINQ

    - by Alex
    Hello, i have some class which constructs itself from string, like this: CurrencyVector v = new CurrencyVector("10 WMR / 20 WMZ"); it's actually a class which holds multiple currency values, but it does not matter much. I need to change type of column in my LINQ table (in vs 2010 designer) from String to that class, CurrencyVector. If i do it - i get runtime error when LINQ runtime tries to cast String as CurrencyVector (when populating the table from database). Adding IConvertible did not help. I wrapped these columns in properties, but it's ugly and slow solution. Searching internet gave no results.

    Read the article

  • select from varchar2 column with numeric value sometimes gives invalid number error

    - by Rene
    I'm trying to understand why, on some systems, I get an invalid number error message when I'm trying to select a value from a varchar2 column while on other systems I don't get the error while doing the exact same thing. The table is something like this: ID Column_1 Column_2 1 V text 2 D 1 3 D 2 4 D 3 and a query: select ID from table where column_1='D' and column_2 = :some_number_value :some_number_value is always numeric but can be null. We've fixed the query: select ID from table where column_1='D' and column_2 = to_char(:some_number_value) This original query runs fine on most systems but on some systems gives an "invalid number" error. The question is why? Why does it work on most systems and not on some?

    Read the article

  • Syntax error in SharePoint calculated column formula

    - by Jan Aagaard
    Is it possible to debug SharePoint calculated column formulas? I am trying with a really simple SharePoint calculated formula =IF([YTD]<[Budget], "OK", "Not OK"). This being a Danish installations of SharePoint I believe the fomula should look like this: =HVIS([YTD]<=[Budget]; "OK"; "Not OK") But this just leaves with the same syntax error or not supported error. I have tried all combinations of IF/HVIS, with/without the square brackets, comma/semicolon, single quotes/double quotes, but nothing works. The formula =YTD<=Budget works.

    Read the article

  • How Do You Parse Column Data ?

    - by discwiz
    I am trying to parse a file generated by LGA Tracon that lists the position data for aircraft over a given time frame. The data of interest starts with TRACKING DATA and ends with SST and there are thousands of entries per file. The system generating the file, Common ARTS, is very rigid in its formatting and we can expect the column spacing to be consistent. Any help would be greatly appreciated. Thanks, Here is an image to preserve the exact formatting Here is a reduced text file. link text

    Read the article

  • unknown column in where clause

    - by ranzy
    $result = mysql_query("SELECT * FROM Volunteers WHERE Volunteers.eventID = " . $var); $sql = mysql_query("SELECT * FROM Members WHERE Members.pid = " . $temp); I am also doing or die(mysql_error()) at the end of both statements if that matter. My problem is that the first statement executes perfectly but in that table I store an attribute called pid. So the second statement is supposed to take that and return the row where it equals that pid so I can get the name. I get an error that says unknown column in 'a2' in 'where clause' where a2 the pid attribute returned from the first statement. Thanks for any help!

    Read the article

  • Adding relative week number column to MySQl results

    - by Anthony
    I have a table with 3 columns: user, value, and date. The main query returns the values for a specific user based on a date range: SELECT date, value FROM values WHERE user = '$user' AND date BETWEEN $start AND $end What I would like is for the results to also have a column indicating the week number relative to the date range. So if the date range is 1/1/2010 - 1/20/2010, then any results from the first Sun - Sat of that range are week 1, the next Sun - Sat are week 2, etc. If the date range starts on a Saturday, then only results from that one day would be week 1. If the date range starts on Thursday but the first result is on the following Monday, it would be week 2, and there are no week 1 results. Is this something fairly simple to add to the query? The only ideas I can come up with would be based on the week number for the year or the week number based on the results themselves (where in that second example above, the first result always gets week 1).

    Read the article

  • Fetch Max from a date column grouped by a particular field

    - by vamyip
    Hi, I have a table similar to this: LogId RefId Entered ================================== 1 1 2010-12-01 2 1 2010-12-04 3 2 2010-12-01 4 2 2010-12-06 5 3 2010-12-01 6 1 2010-12-10 7 3 2010-12-05 8 4 2010-12-01 Here, LogId is unique; For each RefId, there are multiple entries with timestamp. What I want to extract is LogId for each latest RefId. I tried solutions from this link:http://stackoverflow.com/questions/121387/sql-fetch-the-row-which-has-the-max-value-for-a-column. But, it returns multiple rows with same RefId. Can someone help me with this? Thanks Vamyip

    Read the article

  • Gridview changing text in a button column

    - by Bob Avallone
    I am working in asp.net using the gridview control. I have a button column that I create dynamically as such: ButtonField bfSelect = new ButtonField(); bfSelect.HeaderText = "View"; bfSelect.ButtonType = ButtonType.Link; bfSelect.CommandName = "View"; bfSelect.Text = "View"; grdAttachments.Columns.Add(bfSelect); The text on the button is the same for every row. I was wondering if there was any way to have the text be different for different rows depending on a condition. When I try to look at the text property of a particular row it is blank, if I try to set it, it does not change. Thanks in advance. Bob

    Read the article

  • Find the min max and average of one column of data in python

    - by user1440194
    I have a set of data that looks like this 201206040210 -3461.00000000 -8134.00000000 -4514.00000000 -4394.00000000 0 201206040211 -3580.00000000 -7967.00000000 -4614.00000000 -7876.00000000 0 201206040212 -3031.00000000 -9989.00000000 -9989.00000000 -3419.00000000 0 201206040213 -1199.00000000 -6961.00000000 -3798.00000000 -5822.00000000 0 201206040214 -2940.00000000 -5524.00000000 -5492.00000000 -3394.00000000 0 I want to take the second to last column and find the min, max, and average. Im a little confused on how to use split when the columns are delimited by a space and -. i Figure once i do that i can use min() and max function. I have written a shell script to do the same here #!/bin/ksh awk '{print substr($5,2);}' data' > /data1 sort -n data1 > data2 tail -1 data2 head -1 data2 awk '{sum+=$1} END {print "average = ",sum/NR}' data2 Im just not sure how to do this in python. Thanks

    Read the article

  • All possible combinations for two column data

    - by Alec Dobbie
    I have a two column view Product Id Tag ---------------------- 1 Leather 1 Watch 2 Red 2 Necklace 2 Pearl I'm trying to get all possible combinations of tags for a product as such: 1 Leather 1 Leather,Watch 2 Pearl 2 Pearl,Necklace 2 Pearl Necklace,Red 2 Necklace 2 Necklace, Red 2 Red I've found and stolen some SQL that give me the complete list for all but not the small versions, its below. Any ideas, it's started to make my head hurt. A virtual pint for the best answer. SELECT ProductId, (SELECT CAST(Tag + ', ' AS VARCHAR(MAX)) FROM ProductByTagView WHERE Product.ProductId = ProductByTagView.ProductId order by tag FOR XML PATH ('')) AS Tags FROM Product

    Read the article

  • Table alias -- Unkown column in field list

    - by Jason
    Hi all, I have a sql query which is executing a LEFT JOIN on 2 tables in which some of the columns are ambiguous. I can prefix the joined tables but when I try to prefix one of the columns from the table in the FROM clause, it tells me Unknown column. I even tried giving that table an alias like so ...From points AS p and using "p" to prefix the tables but that didn't work either. Can someone tell me what I'm doing wrong. Here is my query: SELECT point_title, point_url, address, city, state, zip_code, phone, `points`.`lat`, `points`.`longi`, featured, kmlno, image_url, category.title, category_id, point_id, lat, longi, reviews.star_points, reviews.review_id, count(reviews.point_id) as totals FROM (SELECT *, ( 3959 * acos( cos( radians('37.7717185') ) * cos( radians( lat ) ) * cos( radians( longi ) - radians('-122.4438929') ) + sin( radians('37.7717185') ) * sin( radians( lat ) ) ) ) AS distance FROM points HAVING distance < '25') as distResults LEFT JOIN category USING ( category_id ) LEFT JOIN reviews USING ( point_id ) WHERE (point_title LIKE '%Playgrounds%' OR category.title LIKE '%Playgrounds%') GROUP BY point_id ORDER BY totals DESC, distance LIMIT 0 , 10

    Read the article

  • Sql Server XML-type column duplicate entry detection

    - by aaaa bbbb
    In Sql Server I am using an XML type column to store a message. I do not want to store duplicate messages. I only will have a few messages per user. I am currently querying the table for these messages, converting the XML to string in my C# code. I then compare the strings with what I am about to insert. Unfortunately, Sql Server pretty-prints the data in the XML typed fields. What you store into the database is not necessarily exactly the same string as what you get back out later. It is functionally equivalent, but may have white space removed, etc. Is there an efficient way to compare an XML string that I am considering inserting with those that are already in the database? As an aside, if I detect a duplicate I need to delete the older message then insert the replacement.

    Read the article

  • Change column names of a cube action as they appear in Visual Studio

    - by hermann
    the title pretty much says it all. I have a cube with data in it and I have yet to find a way to change the column names. They appear in a very ugly manner like [cubeName].[$dimension.columnName]. I have tried everything I know and anything I found on the web but nothing seems to be working. What I tried to do in most cases is create an Action in the Actions tab and write some MDX query language in there. No results whatsoever. As if the action is never run. Does anyone know how to do this? I've spent about 3 days trying to figure this out. Thank you.

    Read the article

  • Checking if a boolean column is true in MySQL/Rails

    - by Pygmalion
    Rails and MySQL: I have a table with several boolean columns representing tags. I want to find all the rows for which a specific one of these columns is 'true' (or I guess in the case of MySQL, '1'). I have the following code in my view. @tag = params[:tag] @supplies = Supply.find(:all, :conditions=>["? IS NOT NULL and ? !=''", @tag, @tag], :order=>'name') The @tag is being passed in from the url. Why is it then that I am instead getting all of my @supplies (i.e. every row) rather than just those that are true for the column for @tag. Thanks!

    Read the article

  • How to add a sequence column to an existing table with records

    - by user1888543
    I had created a new table named USERLOG with two fields from a previous VIEW. The table already consist of about 9000 records. The two fields taken from the VIEW, i.e. weblog_views consist of IP (consists of IP address), and WEB_LINK (consists of URL). This is the code I used, CREATE TABLE USERLOG AS SELECT C_IP, WEB_LINK FROM weblog_views; I want to add another column to this table called the USER_ID, which would consists of a sequence starting with 1 to 9000 records to create a unique id for each existing rows. I need help with this part. I'm using Oracle SQL Developer: ODMiner version 3.0.04. I tried using the AUTO-INCREMENT option, ALTER TABLE USERLOG ADD USER_ID INT UNSIGNED NOT NULL AUTO_INCREMENT; But I get an error with this, Error report: SQL Error: ORA-01735: invalid ALTER TABLE option 01735. 00000 - "invalid ALTER TABLE option" So, I would really appreciate any help that I can get!

    Read the article

  • Anova test in the loop and outputing the p-value in separate column

    - by Juanhijuan
    Once again I'm trying to get an answer. I am already stuck for like 5h with that so that's why I keep trying to get an answer. That's my data: id Sequence variable value 75 AAAAGAAAVANQGKK BiotinControl1_2 3893050.50 192 AAAAGAAAVANQGKK BiotinControl1_2 900604.61 3770 AAFTKLDQVWGSE BiotinControl1_2 90008.14 The code which I am trying to use to calculate the p-value: My Code: tbl_anv <- tbl_all_onlyK[,c("id", "BiotinControl1_2", "BiotinControl2", "BiotinControl3", "BiotinTreatment1_2", "BiotinTreatment2", "BiotinTreatment3", "Sequence")] tbl_reo <- melt(tbl_anv, measure.vars=2:7) set.seed(1) vars <- c("id", "BiotinControl1_2", "BiotinControl2", "BiotinControl3", "BiotinTreatment1_2", "BiotinTreatment2", "BiotinTreatment3", "Sequence") tbl_reo <- as.data.frame(tbl_reo) by(tbl_reo,tbl_reo$Sequence,function(x){ anova(lm(value ~ variable, data = x))$"Pr(>F)"[1] }) An error ocurs: There were 50 or more warnings (use warnings() to see the first 50) Anyway, how can I do that and export the p-value in the separate column. That's what I tried to do on my own: aov_test <- by(tbl_reo,tbl_reo$Sequence,function(x){ anova(lm(value ~ variable, data = x))$"Pr(>F)"[1] }) tbl_reo[,5] <- aov.test[[1]]$'Pr(>F)'[1]

    Read the article

  • WPF datagrid live-update with button-column

    - by dlang
    Dear All! I have a datagrid which contains bid and ask - prices for currency-symbols. The data is updated every seconds. I update the data by creating a new collection of my viewmodel-entities and bind this collection to the datagrid every second. The problem is: Because my datagrid contains a template-column with a button "buy", this button is also recreated every second! This means, that when the user hovers the button, the hover-styles blinks, as the button is recreated every second. Additionally sometimes the click-event is not fired correctly, if the button is recreated while the user has his mouse-left-button pressed. Any suggestions, how to solve real-time-update a datagrid with button-columns?

    Read the article

  • Doctrine 1.2 Column Naming Conventions for Many To Many Relationships

    - by Alan Storm
    I'm working with an existing database schema, and trying to setup two Doctrine models with a Many to Many relationship, as described in this document When creating tables from scratch, I have no trouble getting this working. However, the existing join tables use a different naming convention that what's described in the Doctrine document. Specifically Table 1 -------------------------------------------------- table_1_id ....other columns.... Table 2 -------------------------------------------------- table_2_id ....other columns.... Join Table -------------------------------------------------- fktable1_id fktable_2_id Basically, the previous developers prefaced all forign keys with an fk. From the examples I've seen and some brief experimenting with code, it appears that Doctrine 1.2 requires that the join table use the same column names as the tables it's joining in Is my assumption correct? If so, has the situation changed in Doctrine 2? If the answers to either of the above are true, how do you configure the models so that all the columns "line up"

    Read the article

  • Sphinx: change column set for searching in runtime

    - by Fedyashev Nikita
    I use Ultrasphinx gem plugin as a wrapper for accessing Sphinx search daemon. My model declaration: class Foo < ActiveRecord::Base is_indexed :fields => ['content', 'private_notes', 'user_id'] Client code: filters = {} if type == "private" # search only in `content` column filters['user_id'] = current_user.id else # search in `content` and `private_notes` columns end results = Ultrasphinx::Search.new(:query => params[:query], :per_page => 20, :page => params[:page] || 1, :filters => filters) The problem I have now with Ultrasphinx gem(or Sphinx, in general?) is that it does not allow me to change set of fields where to look for matches IN RUNTIME How can I solve this problem?

    Read the article

  • Force column order, Excel data table

    - by Chris
    I have a Excel Workbook that I use as a report template. I change the datasource on each pivot and datatable in a C# app. When I change the datatable datasource it tweeks the columns. Is there a way to force the column order? private void RefreshRawData(string dataSource, string connection) { xl._Worksheet ws = (xl._Worksheet)xlTemplate.Worksheets["Raw Data"]; xl.ListObject table = ws.ListObjects["Table_ExternalData_1"]; xl.QueryTable qt = table.QueryTable; qt.CommandText = dataSource; qt.Connection = GetExcelConnectionString((string)qt.Connection); qt.BackgroundQuery = false; qt.Refresh(m); Marshal.ReleaseComObject(ws); Marshal.ReleaseComObject(table); Marshal.ReleaseComObject(qt); ws = null; table = null; qt = null; }

    Read the article

  • Data Grid Shows extra column

    - by cre-johnny07
    I have a wpf data Grid where I created twlo columns. But whenever I run the window the datagrid shows a extra column. I can't figure out why.? Below is my code <Custom:DataGrid Background="White" AlternatingRowBackground="#103D7EC5" RowHeaderWidth="20" SelectionMode="Single" SelectionUnit="FullRow" GridLinesVisibility="None" MinRowHeight="30" EnableRowVirtualization="True" EnableColumnVirtualization="True" CanUserAddRows="False" CanUserSortColumns="True" AreRowDetailsFrozen="True" RowDetailsVisibilityMode="Collapsed" ItemsSource="{Binding CurrentEntity.RefDetails, Mode = TwoWay}" AutoGenerateColumns="False" Name="grdDoctor1" ScrollViewer.VerticalScrollBarVisibility="Auto" MaxHeight="200"> <Custom:DataGrid.RowDetailsTemplate> <DataTemplate> </DataTemplate> </Custom:DataGrid.RowDetailsTemplate> <Custom:DataGrid.Columns> <Custom:DataGridTextColumn Binding="{Binding DepId}" Width="100" IsReadOnly="True" Header="Id"/> <Custom:DataGridTextColumn Binding="{Binding DepData}" Width="100" IsReadOnly="False" Header="Data"/> </Custom:DataGrid.Columns> </Custom:DataGrid> Any suggestion why this is happening..?

    Read the article

  • Qlikview joins that dosen't join on all matching column names

    - by Dev_Karl
    Hi! I'm new to Qlikview and looking for some answers regarding scripting. How can I create Qlickview joins that just join on a specific column (and not all that are having a matching name)? Let's say that I'm having the following tables: Employee Id | Person | DepartmentID | Flags 1000 , Bob , 2001 , 1000000 1001 , Sue , 2002 , 1100000 Department Id | Name | Flags 2001 , HR , 01101111 2001 , R&D , 1100000 What is the best way of joining those tables on the DepartmentID <- ID field? The data is provided by SQL selects. I'm thinking of writing SQL views using unique names would be one idea, but there must be a simpler way. Please advice Kind regards, Karl

    Read the article

  • Query to add a column depending of outcome of there columns

    - by Tam
    I have a user table 'users' that has fields like: id first_name last_name ... and have another table that determines relationships: user_id friend_id user_accepted friend_accepted .... I would like to generate a query that selects all the users but also add another field/column say 'network_status' that depends on the values of user_accepted and fiend_accepted. For example, if user_accepted is true friend_accepted is false I want the 'network_status' field to say 'request sent'. Can I possibly do this in one query? (I would prefer not to user if/else inside the query but if that's the only way so be it)

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >