Search Results

Search found 7127 results on 286 pages for 'calculated columns'.

Page 89/286 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • wpf style converter : "Convert" called by every datagrid column using it

    - by Sonic Soul
    I created a converter, and assigned it to a style. than i assigned that style, to the columns i want affected. as rows are added, and while stepping through debugger, i noticed that the converter convert method gets called 1 time per column (each time it is used). is there a way to optimize it better, so that it gets called only once and all columns using it get the same value? <Style x:Key="ConditionalColorStyle" TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellStyle}"> <Setter Property="Foreground"> <Setter.Value> <Binding> <Binding.Converter> <local:ConditionalColorConverter /> </Binding.Converter> </Binding> </Setter.Value> </Setter> </Style>

    Read the article

  • Constant value.

    - by Harikrishna
    Is there any constant value like if we display it in the datagridview it will not display and if we add it in the decimal value the value remains as it is ? Like what I am doing is, I am making addition of two columns say B,C for the column A like dataTable.Columns["A"].Expression="B+C"; Now problem is when there is any value of column B or C is null then there is no value in the column A because of A=B+C like 1+null is null. And even I can not replace 0 where there is null for the column B or C because I am displaying records of each column A,B and C in the datagridview and I don't want to display value for column which has value null so if I replace 0 where there is null then 0 will be displayed for that column which I don't want. So what should I do for that ? So what is the constant value which I should replace for null value for the column B and C so if value of A remains it is and even that value will not be displayed in the datagridview.

    Read the article

  • SQL Query Help Part 2 - Add filter to joined tables and get max value from filter

    - by Seth
    I asked this question on SO. However, I wish to extend it further. I would like to find the max value of the 'Reading' column only where the 'state' is of value 'XX' for example. So if I join the two tables, how do I get the row with max(Reading) value from the result set. Eg. SELECT s.*, g1.* FROM Schools AS s JOIN Grades AS g1 ON g1.id_schools = s.id WHERE s.state = 'SA' // how do I get row with max(Reading) column from this result set The table details are: Table1 = Schools Columns: id(PK), state(nvchar(100)), schoolname Table2 = Grades Columns: id(PK), id_schools(FK), Year, Reading, Writing...

    Read the article

  • SQL query for getting count on same table using left outer join

    - by Sasi
    Hi all, I have a table from which i need to get the count grouped on two columns. the table has two columns one datetime column and another one is success value(-1,1,0) What i am looking for is something like this... count of success value for each month month----success-----count 11------- -1 ------- 50 11------- 1 --------- 50 11------- 0 ------- 50 12------- -1 ------- 50 12------- 1 ------- 50 12------- 0 ------- 50 if there is no success value for a month then the count should be null or zero. I have tried with left outer join as well but of no use it gives the count incorrectly. Thanks in advance Sasi

    Read the article

  • How to fine tune FluentNHibernate's auto mapper?

    - by Venemo
    Okay, so yesterday I managed to get the latest trunk builds of NHibernate and FluentNHibernate to work with my latest little project. (I'm working on a bug tracking application.) I created a nice data access layer using the Repository pattern. I decided that my entities are nothing special, and also that with the current maturity of ORMs, I don't want to hand-craft the database. So, I chose to use FluentNHibernate's auto mapping feature with NHibernate's "hbm2ddl.auto" property set to "create". It really works like a charm. I put the NHibernate configuration in my app domain's config file, set it up, and started playing with it. (For the time being, I created some unit tests only.) It created all tables in the database, and everything I need for it. It even mapped my many-to-many relationships correctly. However, there are a few small glitches: All of the columns created in the DB allow null. I understand that it can't predict which properties should allow null and which shouldn't, but at least I'd like to tell it that it should allow null only for those types for which null makes sense in .NET (eg. non-nullable value types shouldn't allow null). All of the nvarchar and varbinary columns it created, have a default length of 255. I would prefer to have them on max instead of that. Is there a way to tell the auto mapper about the two simple rules above? If the answer is no, will it work correctly if I modify the tables it created? (So, if I set some columns not to allow null, and change the allowed length for some other, will it correctly work with them?) EDIT: I managed to achieve the above by using Fluent NHibernate's convention API. Thanks to everyone who helped! However, there is one more thing: after checking out the convention API, I really would like my IDs to be calld "ID", not "Id", but it seems to me that the PrimaryKey.Name.Is(x => "ID") is not working at all. If I add it to the conventions collection and rewrite my entities' properties to "ID" instead of "Id", it throws an exception that there is no primary key mapped. Any thoughts on this?

    Read the article

  • Migrate a Django project from MySQL to Oracle

    - by pablo
    Hi, I have a Django1.1 project that works with a legacy MySQL db. I'm trying to migrate this project to Oracle (xe and 11g). We have two options for the migration: - Use SQL developer to create a migration sql script. - Use Django fixtures. The schema created with the sql script from sql developer doesn't match the schema created from syncdb. For example, Django expects TIMESTAMP columns while sql developer creates DATE columns. Using syncdb with Django fixtures could be great but when trying to load the MySQL fixtures into Oracle, after using syncdb, I'm getting: IntegrityError: ORA-00001: unique constraint (USER.SYS_C004253) violated How can I find what part create the integrity error? Thanks

    Read the article

  • Extjs - Getting more from the server

    - by fatnjazzy
    Hi, Is it possible to get every data from the server? for example, i want to get the columns items from the server Via Ajax/Proxy by sending json string? thanks var grid = new Ext.grid.GridPanel({ store: store, columns: [ {id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'}, {header: 'Price', width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'}, {header: 'Change', width: 75, sortable: true, renderer: change, dataIndex: 'change'}, {header: '% Change', width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'}, {header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ], stripeRows: true, autoExpandColumn: 'company', height: 350, width: 600, title: 'Array Grid', stateful: true, stateId: 'grid' });

    Read the article

  • Reportviewer - Print report - matrix report expanding horizontally to multiple pages, avoid repeating row header

    - by abc0077
    I am generating a matrix report dynamically using report viewer version 9.0 in visual studio 2010. If i export save and print then it works normally. If there more columns report expands horizontally across mutiple pages. If i give Print option available in the toolbar of the report viewer. The columns are moved to second page which is correct but the row headers (product 1, product 2) should not be repeated in the second page.In the second page report should have all details except the product information. I am also interested to know whether it is the functionality of this version report viewer.

    Read the article

  • Pick Return Values of Stored Procedure

    - by Juergen
    Hi, I have a stored procedure that returns a result with 250!!! columns. But I only need 3 out of the 250. I want to call the SP and put only the 3 column values in a temp table. I don't want to define a temp table with 250 columns! This is how I would like to do it, but this doesn't work of course: create #myTempTable (id int, value1 int, value2 int) insert into #myTempTable exec myBigFatStoredProc Can it be done anyhow? Bye Juergen

    Read the article

  • I need a program to store the database script for oracle

    - by Hakan Kara
    We are developing a project that has 3 enviroments (development, test, production) So there are 3 databases (actually more than 3, because we have 5 customers so we have more than 10 databases) and they must be synchronised. There are 30 coders working for this project. Everone adds, deletes, and changes procedures, table columns etc. We need a program to store our database scripts like visual studio's team foundation server. See the change history of script file. Everyone must access that program and be able to put their scripts. Recover previous versions of script file. Execute these scripts over a selected database. Compare databases by procedures (not only by name, by content of procedure), functions, table columns, packages etc. I am searching a program like that. Which one do you suggest me?

    Read the article

  • How can I make a multi search SPROC/UDF by passing a tabled-value to it?

    - by Shimmy
    I actually want to achieve the following description This is the table argument I want to pass to the server <items> <item category="cats">1</item> <item category="dogs">2</item> </items> SELECT * FROM Item WHERE Item.Category = <one of the items in the XML list> AND Item.ReferenceId = <the corresponding value of that item xml element> --Or in other words: SELECT FROM Items WHERE Item IN XML according to the splecified columns. Am I clear enought? I don't mind to do it in a different way other than xml. What I need is selecting values that mach an array of two of its columns' values.

    Read the article

  • PL/SQL bulk collect into associative array with sparse key

    - by Dan
    I want to execute a SQL query inside PL/SQL and populate the results into an associative array, where one of the columns in the SQL becomes the key in the associative array. For example, say I have a table Person with columns PERSON_ID INTEGER PRIMARY KEY PERSON_NAME VARCHAR2(50) ...and values like: PERSON_ID | PERSON_NAME ------------------------ 6 | Alice 15 | Bob 1234 | Carol I want to bulk collect this table into a TABLE OF VARCHAR2(50) INDEX BY INTEGER such that the key 6 in this associative array has the value Alice and so on. Can this be done in PL/SQL? If so, how?

    Read the article

  • sql server 2005 - return single row when 2 records in right table

    - by Peanut
    Hi, I have two related sql server tables ... TableA and TableB. ***TableA - Columns*** TableA_ID INT VALUE VARCHAR(100) ***TableB - Columns*** TableB_ID INT TableA_ID INT VALUE VARCHAR(100) For every single record in TableA there are always 2 records in TableB. Therefore TableA has a one-to-many relationship with TableB. How could I write a single sql statement to join these tables and return a single row for each row in TableA that includes: a column for the VALUE column in the first related row in table B a column for the VALUE column in the second related row in table B? Thanks.

    Read the article

  • triggers for generating userID based on user's information.

    - by nectar
    I have complaint table 1. tblProfile with columns userId | name | age | address | mobileno | 2. tblUserId with columns userId | role | status now when user fills the form I want to insert one row in tblProfile, before inserting a new row I want to create userId by combining starting letters of name and mobile no and then insert into tblprofile with userId after this I want to insert that UserId into tblUserId table. for this I have to use two triggers one is before insert trigger and another is after insert trigger.but I dont know how to capture user information to create userId and how to pass that Id to second trigger.

    Read the article

  • Building a QueryExpression where name field is either A or B

    - by Mike
    I'm trying to build a Dynamics CRM 4 query so that I can get calendar events that are named either "Event A" or "Event B". A QueryByAttribute doesn't seem to do the job as I cannot specify a condition where the field called "event_name" = "Event A" of "event_name" = "Event B". When using the QueryExpression, I've found the FilterExpression applies to the Referencing Entity. I don't know if the FilterExpression can be used on the Referenced Entity at all. The example below is something like what I want to achieve, though this would return an empty result set as it will go looking in the entity called "my_event_response" for a "name" attribute. It's starting to look like I will need to run several queries to get this but this is less efficient than if I can submit it all at once. ColumnSet columns = new ColumnSet(); columns.Attributes = new string[]{ "event_name", "eventid", "startdate", "city" }; ConditionExpression eventname1 = new ConditionExpression(); eventname1.AttributeName = "event_name"; eventname1.Operator = ConditionOperator.Equal; eventname1.Values = new string[] { "Event A" }; ConditionExpression eventname2 = new ConditionExpression(); eventname2.AttributeName = "event_name"; eventname2.Operator = ConditionOperator.Equal; eventname2.Values = new string[] { "Event B" }; FilterExpression filter = new FilterExpression(); filter.FilterOperator = LogicalOperator.Or; filter.Conditions = new ConditionExpression[] { eventname1, eventname2 }; LinkEntity link = new LinkEntity(); link.LinkCriteria = filter; link.LinkFromEntityName = "my_event"; link.LinkFromAttributeName = "eventid"; link.LinkToEntityName = "my_event_response"; link.LinkToAttributeName = "eventid"; QueryExpression query = new QueryExpression(); query.ColumnSet = columns; query.EntityName = EntityName.mbs_event.ToString(); query.LinkEntities = new LinkEntity[] { link }; RetrieveMultipleRequest request = new RetrieveMultipleRequest(); request.Query = query; return (RetrieveMultipleResponse)crmService.Execute(request); I'd appreciate some advice on how to get the data I need.

    Read the article

  • how to have separate keys per record in mongo_mapper + Rails

    - by Vitaly Kushner
    When I'm adding a record in mongodb I can specify whatever keys I want and it will store it in the db. The problem is that it will remember those keys for the next time I insert another record. so for example if I do the following: Product.create :foo => 123 and then Product.create :bar => 456 I get :foo => nil field in the 2nd record. This is definitely not a limitation of mongodb itself, since if I restart the rails console and create yet another record with different set of columns, it will not add the columns from the 1st 2 records. So it seems like mongomapper remembers all the keys used and inserts them all into all records, even if values are not provided. The question is obviously: how do I disable this crazy attributes explosion? Basically I want only the 'permanent' keys that I specify in the model to be in every record, but all the 'extra' attributes to be specified per record and not to mess the consequent records.

    Read the article

  • Multiple Table Join in Linq C# Dynamically

    - by kmkperumal
    I have 3 data table a,b,c In this I need to write Join Query Dynamically using linQ. The Selecting columns given by customer and Condition columns also given customer at run time. So i need to create Querys dynamically.Please check below example.Because i dont which table they want and which column also For example Select a.c1,a.c2,b.c1,b.c2 From a Left Join b on a.c1=b.c1 2.Select c.c1,c.c2,a.c1,a.c2 From c Left Join a on c.c3=a.c1 3.Select a.c1,a.c2,b.c1,b.c2,c.c1,c.c2 From a Left Join b on a.c2=b.c2 Left join c on c.c1=a.c1 Like i need create different set of query's. Please help me on this.

    Read the article

  • TSQL, select values from large many-to-many relationship

    - by eugeneK
    I have two tables Publishers and Campaigns, both have similar many-to-many relationships with Countries,Regions,Languages and Categories. more info Publisher2Categories has publisherID and categoryID which are foreign keys to publisherID in Publishers and categoryID in Categories which are identity columns. On other side i have Campaigns2Categories with campaignID and categoryID columns which are foreign keys to campaignID in Campaigns and categoryID in Categories which again are identities. Same goes for Regions, Languages and Countries relationships I pass to query certain publisherID and want to get campaignIDs of Campaigns that have at least one equal to Publisher value from regions, countries, language or categories thanks

    Read the article

  • Question about joins and table with Millions of rows

    - by xRobot
    I have to create 2 tables: Magazine ( 10 millions of rows with these columns: id, title, genres, printing, price ) Author ( 180 millions of rows with these columns: id, name, magazine_id ) . Every author can write on ONLY ONE magazine and every magazine has more authors. So if I want to know all authors of Motors Magazine, I have to use this query: SELECT * FROM Author, Magazine WHERE ( Author.id = Magazine.id ) AND ( genres = 'Motors' ) The same applies to Printing and Price column. To avoid these joins with tables of millions of rows, I thought to use this tables: Magazine ( 10 millions of rows with this column: id, title, genres, printing, price ) Author ( 180 millions of rows with this column: id, name, magazine_id, genres, printing, price ) . and this query: SELECT * FROM Author WHERE genres = 'Motors' Is it a good approach ? I can use Postgresql or Mysql.

    Read the article

  • CSS float column extending over footer

    - by JD
    Hi, I am having a problem with my CSS whereby the right hand column in a 2 column layout is extending beyond the footer. I have tried playing with the clear: both; property but I cannot get it to work.. the second column has the id column2 both columns use the class column. The footer html has the id footerWrapper Both columns and footer are div tags. My CSS (abridged): .column { width: 49%; } #column2 { width: 50%; position: absolute; top: 0px; margin-left: 50%; float: left; } #footerWrapper { background-color: #333333; border-top: 2px #FF6600 solid; color: #666; }

    Read the article

  • How do I select differing rows in two MySQL tables with the same structure?

    - by chiborg
    I have two tables, A and B, that have the same structure (about 30+ fields). Is there a short, elegant way to join these tables and only select rows where one or more columns differ? I could certainly write some script that creates the query with all the column names but maybe there is an SQL-only solution. To put it another way: Is there a short substitute to this: SELECT * FROM table_a a JOIN table_b b ON a.pkey=b.pkey WHERE a.col1 != b.col2 OR a.col2 != b.col2 OR a.col3 != b.col3 # .. repeat for 30 columns

    Read the article

  • SSIS - Can I get the column schema for a flat file source from a database?

    - by Steve Clement
    We receive a nightly data export from a vendor in the form of about 10 tab-delimited flat file without column headers. In addition, the vendor provides us with the SQL scripts for the database tables so that we can import the files into our system. Unfortunately, the vendor recently changed the schema for the flat files. Each file has upwards 150 columns, and having to go through the DB schema and adjust column types on a Flat File Data Source in SSIS is extremely time consuming, not to mention a royal pain. Since I know the file data layout in the database schema, is there any way I can dynamically pull that into a Flat File source to set the columns correctly? Or am I just stuck with manually setting everything?

    Read the article

  • WPF: DataGrid Custom. ColumnDesign with my own classes

    - by user437899
    Hi, iam looking for a datagrid which contains objects from my class. class user { string name; int ID; ... } i tried AutoGenerateColumns = true. this will add columns (name, ID, ... like the properties of my class) but i want a different design. not all attributes from the object shold be shown and the columnheader shouldn't be generated from the variablenames... if i build a custom. column-design, i cant add my objects / they will not be displayed. is it possible to define my own columns according to my objects/class. i read about databindings, but i have no idea how i can bind objects/classes in WPF. (in Visual Studio i cant choose my class as datacontext)

    Read the article

  • How can i show delete image in each row in a Data grid ?

    - by developer
    i want show a image onmouse over inside data grid to each row,so if i click on that image,some function should call(as per my requirement). how can i do this ? <mx:DataGrid width="320" height="624" verticalScrollPolicy="on" dataProvider="{blocked_Usernames}" editable="true"> <mx:columns> <mx:DataGridColumn headerText="Blocked User Name" dataField="blockedUsernames" editorDataField="value"/> <mx:DataGridColumn width="20" editable="false"> <mx:itemRenderer > <mx:Component > <mx:Image source="@Embed('assets/image/Close.png')" width="10" height="10" autoLoad="false"/> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

  • NHibernate and Composite Key References

    - by Rich
    I have a weird situation. I have three entities, Company, Employee, Plan and Participation (in retirement plan). Company PK: Company ID Plan PK: Company ID, Plan ID Employee PK: Company ID, SSN, Employee ID Participation PK: Company ID, SSN, Plan ID The problem is in linking the employee to the participation. From a DB perspective, participation should have Employee ID in the PK (it's not even in table). But it doesn't. NHibernate won't let me map the "has many" because the link expects 3 columns (since Employee PK has 3 columns), but I'd only provide 2. Any ideas on how to do this?

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >