column

Changing a column in oracle that has a foreign key constraint

I have a column that is only 6 characters long in a table that references a column that is 20 characters using a foreign key constraint. How do I fix this? Note: The issue was due to the limitation of the Oracle SQL Developer Edit table. When I performed the specific alter column, it worked fine. ...

Nullable Int Column in DataSet

I'm working with .NET strongly-typed datasets and have a table with a nullable int column (and a nullable DateTime column as well). Apparently there is a bug with the dataset designer that prevents having nullable columns on these data types. The designer only allows "throw exception" as the default behavior for null values. Unfortuna...

Is there any reason to worry about the column order in a table?

I know you can ALTER the column order in MySQL with FIRST and AFTER, but why would you want to bother? Since good queries explicitly name columns when inserting data, is there really any reason to care what order your columns are in in the table? ...

Increase columns width in Silverlight DataGrid to fill whole DG width

Hello, I have a DataGrid Control which is bound to a SQL Table. The XAML Code is: <data:DataGrid x:Name="dg_sql_data" Grid.Row="1" Visibility="Collapsed" Height="auto" Margin="0,5,5,5" AutoGenerateColumns="false" ...

how to extract column from a multi-dimentional array

does anybody know how do to extract a column from a multidimentional array in python.. ...

MySQL Join SUM column on the whole table

Hi all, Let's say I had the following table: id num_votes total_rating ------------------------------- 1 20 30 2 40 13 3 15 25 I want to join the SUM of all ids, let's say, onto the entire table so it looks like: id num_votes total_rating sum ----------------------------------...

What special characters are allowed in T-SQL column name?

I would like to know what special characters are allowed to be used in column name in T-SQL, MSSQL. So I know I can use letters and numbers, but are the other characters that are available without using brackets [] to refer to this column? ...

MOSS 2007 - Parent Folder Column

I use a flat document list for certain document types and I want to give my users a possiblity to jump to the parent folder of this document. Is there a column that contains this information? I couldn't find one. ...

How can I sort by column header if clicked on and then sort in reverse order when clicked on again?

I have a table of data that is dynamically being brought in with PHP. I have two Column Headers - Name and Price I am looking for a php script that lets me sort the data by clicking on one of the Column headers, and then when the user clicks on it again, I want it to sort the data in the reverse order. Or if the user clicks on the other...

Altering SQL column type and adding PK constraint

How to change the type of a column in a SQL table? I've got: CREATE TABLE table( id INTEGER, salt TEXT NOT NULL UNIQUE, step INT, insert_date TIMESTAMP ); I'd like to change salt's type to just TEXT and id's type to INTEGER PRIMARY KEY. UPD: I'm using SQLite. ...

Emacs - Multiple columns one buffer

I'm trying to edit some assembly code which tends to be formatted in long but thin listings. I'd like to be able to use some of the acres of horizontal space I have and see more code on-screen at one time. Is there a method for getting Emacs (or indeed another editor) to show me multiple columns all pointing to the same buffer? C-x 3 ...

add column to mysql table if it does not exist

My research and experiments haven't yielded an answer yet, so I am hoping for some help. I am modifying the install file of an application which in previous versions did not have a column which I want to add now. I do not want to add the column manually, but in the installation file and only if the new column does not already exist in t...

How to CSS a two column list of items?

I need to display a two column list of items according to the following rules: Container for the columns has fluid width Width of both columns needs to be equal Items are dynamically rendered and at least one will be displayed Item ordering needs to flow down the left column first, then the right Items need to line up evenly across the...

Sharepoint: Image field with a link

Hi All, I would like to add a field to a list with displays an Image, but acts as a hyperlink. In other words like the "Hyperlink or Picture" column, but "Hyperlink AND Picture" instead. Where the two fields you input would be the URL to the image to display, and the URL of the hyperlink. This must be possible. I notice that the Type...

PostgreSQL: Select a single-row x amount of times

A single row in a table has a column with an integer value >= 1 and must be selected however many times the column says. So if the column had '2', I'd like the select query to return the single-row 2 times. How can this be accomplished? ...

MySQL enum column from anothertable column

I'm sure this is either totally impossible or really easy: If I'm creating a table and I want one of the columns to have limited options, it seems that I use either the ENUM or SET value type. But I have to define the possible values at that moment. What if I have another table which has two columns, a primary key column and a data colu...

Best way to store a file size in bytes?

What's the best way to store a file size in bytes in database? Considering that the size can be huge MB, GB, TB... I'm using bigint (max: 9.223.372.036.854.775.807), but is it the best way? ...

Access ExtJS grid's column model from other file

I have an ExtJS grid that has a button set up in it. The button triggers a function that's defined into other JS file that's included in the grid page. The function triggers ok but in that function I want to get the columns count like this: grid.getColumnModel().getColumnCount() The problem is that I get an error like: grid.getColumnM...

Add a new column in a large mysql table

What would be the fastest way to add a new column in a large mysql table ? Alter table add column creates a copy of the full table, and then replaces the old one with the new create table. While this process is running, the original table is readable, but all inserts and updates are stalled. On large tables, the copy can take a long t...

Counting non-null columns in a rather strange way

I have a table which has 32 columns. 2 of these columns are identity columns and the rest are values. I would like to get the average of all these 30 columns, excluding the null ones. If none of the columns were null, that would have been pretty easy as follows select (val0 + val1 + val2 + ...) / 30 Since I would like to exclude the nu...