columns

File and space in Python

I have a file like: <space> <space> line1 <space> column 1 column 2 column 3 ... . . . <space> <space> How to remove this extra spaces? I need to extract the heading which will be on line1. Also, I need to extract column 1, column 2, column 3 etc. At the end of last column content there is '\n'.How to get rid of it ??? H...

What's the best way to get a column name in asp.net using ODBC?

I have a database that has four columns like this level_1, level_2, level_3, level_4 There are also id, name, etc., but only these four are the ones that matter to me at the moment. I need to know which column, by columnname, has the value 'BOSS'. For example, level_2 may have the value BOSS. I need to know that one of the four colu...

Number of columns

how do you count the number of columns in a table in oracle? ...

GridView Column Width Altering

Can someone please help me with my problem? I have a gridview in a webpage, whose datasource is an oracle database. I would like to know if it is possible to change the column widths while you are on the web page? string select = "SELECT * FROM TABLE" OracleCommand cmd = new OracleCommand(select, connectionstring); cmd.Connection.Open...

Select distinct from multiple fields using sql

I have 5 columns corresponding to answers in a trivia game database - right, wrong1, wrong2, wrong3, wrong4 I want to return all possible answers without duplicates. I was hoping to accomplish this without using a temp table. Is it possible to use something similar to this?: select c1, c2, count(*) from t group by c1, c2 But this re...

Iterate through search results by column

Is there a way in Vim (or a plugin) to search for a term and iterate through the search results (as per n in Vim), by column, rather than row? So if my file was this: foo1 bar bar baz baz foo3 baz baz foo4 foo2 bar bar If I search for foo I want to iterate through the results in order 1,2,3,4. Normally n would move me ...

3 and 2 column full screen (width & height) layouts (CSS)

Hi all, I was wondering if there were any simple examples that did the following * A right and a left fixed column with a fluid center. With full height and width and a header and footer. * A single left fixed column with a fluid content column 2. With full height and width and a header and footer. * A single...

Change type of a column with numbers from varchar to int

We have two columns in a database which is currently of type varchar(16). Thing is, it contains numbers and always will contain numbers. We therefore want to change its type to integer. But the problem is that it of course already contains data. Is there any way we can change the type of that column from varchar to int, and not lose al...

Resizing Jtable column widths wont work.

//can set column widths using percentages private void setPreferredTableColumnWidths(JTable table, double[] percentages) { Dimension tableDim = table.getSize(); double total = 0; for(int i = 0; i < table.getColumnModel().getColumnCount(); i++) total += percentages[i]; table.setAutoResizeMode(JTable.AUTO_RESIZE_O...

TableAdapter to return ONLY selected columns? (VS2008)

(VS2008) I'm trying to configure a TableAdapter in a Typed DataSet to return only a certain subset of columns from the main schema of the table on which it is based, but it always returns the entire schema (all columns) with blank values in the columns I have omitted. The TableAdpater has the default Fill and GetData() methods that come...

Dynamic gridview columns event problem

Hi, i have a GridView (selectable) in which I want to generate a dynamic GridView in a new row BELOW the selected row. I can add the row and gridview dynamically in the Gridview1 PreRender event. I need to use this event because: _OnDataBound is not called on every postback (same for _OnRowDataBound) _OnInit is not possible because ...

How can I retrieve SQL field names of a temp table using Perl?

Below is the code I'm using to run the query, parse the result set, and parse the rows (respectively) $exec_ret = $DBS->SQLExecSQL($STMT); while ($DBS->SQLFetch() == *PLibdata::RET_OK) { $rowfetch = $DBS->{Row}->GetCharValue($colname[$i]); } Can I grab the column/field name of a temp table using similar syntax? $colname[$i] is...

WPF Treeview with fixed width columns

I want to create a mix of a treeview and a listview. I want to have 2 columns. In the left column i want a recursive treeview and the right column should show some info about the items from the left column. Let's call the left column Name and the right column Value. The problem is that when you expand a treeview the indentation level cha...

How do I look at column metadata in Sybase?

I have a list of columns a co-worker has given to me, but these columns reside in different tables in the DB. Is there some kind of tool in Sybase where I can query the table a column belongs to? (I've tried Google-ing for this kind of tool, but no luck so far) ...

SQL to transpose row pairs to columns in MS ACCESS database

I have an MS Access database that contains translated sentences in source-target pairs (a translation memory for fellow users of CAT tools). Somewhat annoyingly, source and target are not stored in separate columns, but in rows linked by ID, like this: +---+----+--------------+ |id |lang| text | +---+----+--------------+ 1 a...

query for summing up values present in different columns in sql server 2005

i have columns i.e. theory marks, pratical marks, student's Id ,course Id ,& subject Id i need to add up the vaules present in columns theory marks & practical marks in order to get the aggregate, i dont know how to add the column values though. I am using sql server 2005 please help ...

Add a new table column to specific ordinal position

Is it possible to add a column to a table at a specific ordinal position in SQL Server? For instance, our tables always have CreatedOn, CreatedBy, LastModifiedOn, LastModifiedBy columns at the "end" of each table definition? I'd like the new column to show up in SSMS above these columns. If I am scripting all my database changes, is t...

Is there a best practice to database column ordering?

Are there any best practices to column ordering when designing a database? Will order effect performance, space, or the ORM layer? I am aware of http://stackoverflow.com/questions/34818/sql-server-does-column-order-matter. I am looking for more general advice. ...

CSS fluid 'column'

Whats the best way to get this layout in CSS? imagine that I have three divs, two divs inside another.. of the two inner divs, the first one has a specific width set, and the second div is expected to take up the remaining space. Generally I'd end up setting a specific width on the second column, and manage updating this in the end that...

CSS Multi-Column Forms in HTML/ASP.NET

I've researched for hours and still haven't found a robust, non-absolute-positioning solution for displaying multiple-column forms and values without using TABLE tags. Can someone point me to a resource specifically oriented towards reproducing table-based, multiple-column forms (like name and address forms) in CSS to standards? Most o...