column

virtual column for drop down in the ruby on rails.

How to place a drop down for the virtual column, in the ruby on rails. The virutal column does not exist in my table , but I want to get the value from the drop down ,when user saves the data. for example, product_price is a virtual column , which doesn't exist in my database table. But I would like to have a dropdown, with product pr...

Prevent Grid-Column from getting too wide without setting absolute width for child-controls.

Hello, i have a problem with wpf-grid in .net-framework. I have defined a grid in a UserControl, which contains a listview, that shows some content. The content of the listview is presented with DataTemplate and contains a TextBlock which could getting very wide. My grid should separate the UserControl in two 50-50 parts. Both parts sho...

How can I alter a smalldatetime column with a default to be datetime?

I have a number of columns in my database that were originally created as smalldatetime and that really need to be datetime. Many of these columns were created with the DDL: [columnname] smalldatetime not null default getdate() ...which means that in order to alter the column's type, I first have to drop the default, and then re-crea...

MySQL select multiple values from column

Here is the table ID WHO FRUIT 1 Adam Apple 2 Adam Lemon 3 Eve Apple 4 Adam Grape 5 God Papaya 6 Eve Melon How do I get all persons who have apple and lemon: in this case, so that I get the result Adam? Furthermore, I want all persons who have apple and lemon or melon, so I would get Adam ...

mysql - rename column - alis

Hello, Actually the problem arises since we have named a column "authorization" which is ok on mysql but fails miserably on postgres - "authorization" is a reserved keyword there. We want to have all schemas in sync even on different databases, so we want to rename "authorization" in the mysql catalogue(s) to something neutral. It wo...

Repositioning columns in DBGrid in Delphi

I need to dynamically change position of certain column in DBGRid. Let's say I need to place column number 21 on position 10. I use: DBGrid.Columns[21].Index:=10; But, this also changes the array itself, that means, that next time I want to access this column, I will need to write DBGrid.Columns[10], this makes it a little unclean, I ...

Convert Database Rows into Columns

I need to convert Database rows into columns and show the result in Gridview. My DB is as follows: ID Hotel cDate Price ----------------------------------------------- 1 Hotel1 12/22/2009 12:00:00 AM 15.0000 2 Hotel2 12/22/2009 12:00:00 AM 25.0000 3 Hotel3 12/22/2009 12:00:00 AM 60.0000 4 Hotel4 12/22...

Find Underlying Column Size Via NHibernate Metadata

Hi, Is there a way to use SessionFactory.GetClassMetadata(), or any other method you're aware of, to dynamically get the maximum size of a varchar column that underlies an NHibernate class' string property? To clarify, I'm not looking to read a length attribute that's specified in the NHibernate mapping file. I want to deduce the actu...

Can MySQL VARCHAR's store any chars?

Can MySQL VARCHAR's store any char like nulls and newlines? ...

Winform Merging two columns

HI, I want to create a datagridview in a form with 4 columns basically which has only 2 column headers, ie i want to merge only the column headers of 2 columns. Thanks in advance ...

Column total NAN error

I am using this bit of code to add the values in a table column which works pretty well until it encounters a null td cell with a   value. From that point on in the loop, I receive a NaN error in my alert. I'm wondering how to ignore these non-numeric values or replace them with zero for the calculation? Thanks jQuery(function() { ...

How to check if a column with a given name exists in a datarow.

i want to insert a value from loop in datarow so before entering value in datarow i want to check that a perticular column NAME exist in table or not...please tell me how can i check it.. (vb.net preferred). ...

utf8_unicode_ci vs utf8_general_ci collation differences?

What's the difference between the two types of column/table collations? Which is preferred and why? Any thoughts? ...

Table cell stretching

I have two columns in my table with equal width(50%, 50%). I am showing search results URL in them. For big urls the columns are stretching and destroying the layout. Any suggestion to the problem? Thanks & Regards, Subrat. ...

(PHP & mySQL) Treat rows as columns

Hi all, I am working on PHP & mySQL based website. I am trying to setup the 'Settings' page in administration panel where I can enter different settings to manage the site. The settings can range upto 100 (or even more) depending upon the requirements. So instead of making 100 columns (and increase if I have to add more columns in future...

RadGrid - check if a column is fully/partially displayed

How can you check if a column is partially or fully shown on screen when using a radgrid. ...

How can I change gridview templatecolumn order dynamically?

How can I change gridview templatecolumn order dynamically? ...

wpf newbie - how to layout variable set of attributes so they appear in same columns as fixed attributes

Hi all, I am a wpf newbie & loving it. However I have a layout problem which I hope someone can help me with. I need to build a persons attributes editor. These consist of 2 fixed attributes - first name & lastname, plus a variable bucket of other attributes such as age, sex etc. I have build a dialog consists of grid which contains 2 ...

Column Nullability/Optionality: NULL vs NOT NULL

Is there a reason for or against setting some fields as NULL or NOT NULL in a mysql table, apart from primary/foreign key fields? ...

Winform DatagridView Numeric Column Sorting

I am using just a simple DataGridView to hold a bunch of data (Funny that). I have decimals in a particular column. But when it comes to ordering by that decimal column, it orders it incorrectly. For example : Starting order might be : 0.56 3.45 500.89 20078.90 1.56 100.29 2.39 The ending order would be : 0.56 100.29 1.56 200...