select

Select all columns except one in MySQL?

I'm trying to use a select statement to get all of the columns from a certain MySQL table except one. Is there a simple way to do this? EDIT: There are 53 columns in this table (NOT MY DESIGN) Sounds like there's no good solution, thanks anyways guys. ...

Restrict selection of SELECT option without disabling the field

I have a multiple selection SELECT field which I don't want the end user to be able to change the value of. For UI reasons, I would like to be able to do this without using the disabled="true" attribute. I've tried using onmousedown, onfocus, onclick and setting each to blur or return false but with no success. Can this be done or am ...

Select rows in dataset table based on other dataset table

I have a dataset that has two tables in it. I want to do the following (or something like it) is it possible and is how I have it correct? dsTabData.Tables("FilingTabs").Select("fs_ID not in (select fsp_fsid from ParentTabs)") how do you reference data from other table in the same dataset? ...

SQL Query Help: Selecting Rows That Appear A Certain Number Of Times

I have a table with a "Date" column. Each Date may appear multiple times. How do I select only the dates that appear < k number of times? ...

Select tag's size attribute through css?

Normally you can do this: <select size="3"> <option>blah</option> <option>blah</option> <option>blah</option> </select> And it would render as a selectionbox where all three options are visible (without dropping down) I'm looking for a way to set this size attribute from css. ...

Case-insensitive search using Hibernate

I'm using Hibernate for ORM of my Java app to an Oracle database (not that the database vendor matters, we may switch to another database one day), and I want to retrieve objects from the database according to user-provided strings. For example, when searching for people, if the user is looking for people who live in 'fran', I want to be...

Oracle Insert via Select from multiple tables where one table may not have a row

I have a number of code value tables that contain a code and a description with a Long id. I now want to create an entry for an Account Type that references a number of codes, so I have something like this: insert into account_type_standard (account_type_Standard_id, tax_status_id, recipient_id) ( select account_type_standard_seq.nextv...

Javascript to detect whether the dropdown of a select element is visible

I have a select element in a form, and I want to display something only if the dropdown is not visible. Things I have tried: Watching for click events, where odd clicks mean the dropdown is visible and even clicks mean the dropdown isn't. Misses other ways the dropdown could disappear (pressing escape, tabbing to another window), and...

What is wrong with this _popen / select example?

UPDATE: i updated the code and problem description to reflect my changes. I know now that i'm trying a Socket operation on nonsocket. or that my fd_set is not valid since: select returns -1 and WSAGetLastError()returns 10038. But i can't seem to figure out what it is. Platform is Windows. I have not posted the WSAStartup part. in...

c# FormField DropDownList height

I want to know how to set the height property for the HTML Select in code. Tried setting the .Attribute.Add("Style","Height:120px") just to see if I could get it to change but to no avail. ...

What does "select((select(s),$|=1)[0])" do in Perl?

I've seen some horrific code written in Perl but I can't make head or tail of this one. It's in some networking code that we use to communicate with a server and I assume it's something to do with buffering (since it sets $|). But I can't figure out why there's multiple selects or the array reference. Can anyone help me out? ...

Select specific rows with SQL Server XML column type

I'm trying to select data from a table defined similar to the following : Column | Data Type ------------------------- Id | Int DataType | Int LoggedData | XML but I only want to select those rows with a specific DataType value, and that contain a string (or evaluates a piece of XPath) in the LoggedData colum...

Select products where the category belongs to any category in the hierarchy

I have a products table that contains a FK for a category, the Categories table is created in a way that each category can have a parent category, example: Computers Processors Intel Pentium Core 2 Duo AMD Athlon I need to make a select query that if the selected category is Proc...

Java NIO select() returns without selected keys - why?

In writing some test code I have found that Selector.select() can return without Selector.selectedKeys() containing any keys to process. This is happening in a tight loop when I register an accept()ed channel with SelectionKey.OP_READ | SelectionKey.OP_CONNECT as the operations of interest. According to the docs, select() should retur...

Dynamically look up column names for a table while in an sql query

I'm writing SQL (for Oracle) like: INSERT INTO Schema1.tableA SELECT * FROM Schema2.tableA; where Schema1.tableA and Schema2.tableA have the same columns. However, it seems like this is unsafe, since the order of the columns coming back in the SELECT is undefined. What I should be doing is: INSERT INTO Schema1.tableA (col1, col2, ....

Select columns from result set of stored procedure

I have a stored procedure that returns 80 columns, and 300 rows. I want to write a select that gets 2 of those columns. Something like SELECT col1, col2 FROM EXEC MyStoredProc 'param1', 'param2' When I used the above syntax I get the error "Invalid Column Name". I know the easiest solution would be to change the stored procedure,...

quick selection of a random row from a large table in mysql

What is a fast way to select a random row from a large mysql table? I'm working in php, but I'm interested in any solution even if it's in another language. ...

SQL update from one Table to another based on a ID match

Hi All I realy hope someone can help me with this. I have a databse with Account Numbers and card Numbers that I match to a file to update any card numbers to account number so I only work with account numbers. I created a view linking the Table to the Account/Card db to return the Table ID and the related Account number. Now I need to ...

Rows in their own columns depending on their value

I have a select query that currently produces the following results: Description   Code   Price Product 1       A       5 Product 1       B       4 Product 1       C       2 Using the following query: SELECT DISTINCT np.Description, p.promotionalCode, p.Price FROM Price AS p INNER JOIN ...

How can I do boolean logic on two columns in MySQL?

Hi all. I want to do a select in MySql that combines several columns... something like this pseudocode: select payment1_paid and payment2_paid as paid_in_full from denormalized_payments where payment1_type = 'check'; Edit: payment1_paid and payment2_paid are booleans. I can't use any other language for this particular problem than ...