select

Is it possible in DB2 or in any Database to detect if the table is locked or not?

Is it possible in DB2 to detect if the table is locked or not. Actually whenever we use Select statement and if that table is locked [ may be because of on going execution of insertion or deletion ] , then we have to wait till the table is unlocked. In our application sometimes it goes to even 2-3 mins. What i think is, if i can have s...

MySql select just one and order by date and blog?

Hello I want to sort data from mysql. The shema looks like this: id int(11) objectId int(11) type tinyint(4) field tinyint(4) value int(11) date int(10) id objectId type field value date 1 1631 0 10 2918 1183 746534 2 1631 0 11 1108 1183 746534 ...

Dropdown not getting populated in IE?

I am trying to get the values to a select list for subcategories on the basis on what is chosen in categories select list. It doesn't seem to work on IE. Can anyone suggest the problem? In the php file I have <body onload="setSubcategories(default_value);"> In the js file I have something like subcategories = new Array(); subcateg...

JQuery determine if one or more select has 3 options

Hi, I have a page that contains 20 select's with a class name of '.ct'. I need a selector that determines if a select exists that contains 3 or more options. Thanks, Chris ...

JQuery enable button based on select

Hi, I have a page that contains a collection of select's that are used to identify the columns in a text file. Each time a user identifies a column the selected option is removed from the other selects on the page. When the user has identified all columns the "submit" input needs to be activated so the user can move to the next step. I ...

What do you put in a subquery's Select part when it's preceded by Exists?

What do you put in a subquery's Select part when it's preceded by Exists? Select * From some_table Where Exists (Select 1 From some_other_table Where some_condition ) I usually use 1, I used to put * but realized it could add some useless overhead. What do you put? is there a more efficient wa...

jQuery - get select with exactly 2 options

I need to find all select's with exactly 2 options. The code I'm using is: $('select.ct option:nth-child(2)') but it seems to get everything with more than 2 options. ...

RIA Services - IQueryable Function With Multiple Parameters as Conditions

Hi, I am developing an application with RIA Services, and in my DomainService class, I have all that standard functions generated by the RIA for general CRUD operations. The problem is that I tryed to create my own function that insted of listing all the the 45 columns in the Select statment, would list only 2 (NOM and PRENOM) and also ...

Need a workaround: Python's select.select() doesn't work with subprocess' stdout?

From within my master python program, I am spawning a child program with this code: child = subprocess.Popen(..., stdout=subprocess.PIPE, stdin=subprocess.PIPE) FWIW, the child is a PHP script which needs to communicate back and forth with the python program. The master python program actually needs to listen for communication from s...

best way to automate updates installs

I wanted to know if there was a way to have an app automate to answer the questions.. I have created a batch file that starts the app in the start up folder. so I have 2 problems, one was deleting the batch file once it ran from that folder 2. answering the questions for the app? Is that even feasible? we don't have SMS which I was u...

Select option always select

Hey, I have a select options form fields setup like below: <select name="options[]" multiple="multiple"> <option value="1" selected="selected">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> </select> The user can select multiple options, but I woul...

Paging and selecting rows starting with a letter from a DB

I have a table where each row is a username with associated vote count The goal is to do paging by username so you can click on the letter C and get to the C's But if there are only like 2 C's, then you wanna show 18 D's as well or 12 D's and 6 E's So how do i find where to start the query like, select from whatever limit XX, 20 how ...

Simple Linq question: How to select more than one column?

Hi, my code is: List<Benutzer> users = (from a in dc.Benutzer select a).ToList(); I need this code but I only want to select 3 of the 20 Columns in the "Benutzer"-Table. What is the syntax for that? ...

Why does Classic ASP Post a Multiple Select List with a space between values where ASP.Net doesn't?

I have an old Classic ASP code such as: <html> <head></head> <body> <form action="test.asp" method="post" name="fname"> <select name="clients" size="3" multiple="multiple"> <option value="5311" selected="selected">5311</option> <option value="9999" selected="selected">9999</option> </select> <input type="submit" value="tes...

Getting no. of rows affected after running select query in SQL Server 2005

Hi friends, Below is my query select @monNameStr as [MName], IsNull(count(c.AssignmentID),0), IsNull(sum(s.ACV),0), IsNull(sum(s.GrossReturn),0), IsNull(sum(s.NetReturn),0), IsNull(avg(a.Total),0) FROM dbo.Assignment_ClaimInfo c, dbo.Assignment_SettlementInfo s, db...

SQL Server: Concatenating WHERE Clauses. Seeking Appropriate Pattern

I want to take a poorly designed SQL statement that's embedded in C# code and rewrite it as a stored procedure (presumably), and am looking for an appropriate means to address the following pattern: sql = "SELECT <whatever> FROM <table> WHERE 1=1"; if ( someCodition.HasValue ) { sql += " AND <some-field> = " + someCondition.Value; ...

how to disable a jqgrid select list (dropdown) on the edit form

This is strange and any alternative method to what I want to accomplish is welcome. My app uses the jqgrid 3.5.3 and I need to disable a select list on my edit form. When I do so using the code displayed below it breaks the edit form - meaning I can not cancel or submit it. Thanks. This code is in the edit options array of the navGrid me...

Is possible to use nanosleep in a infinite loop with select()?

Hi, I have a C program that do recv/send operations from/to socket using a for(;;) loop and a select() to monitor the file descriptor. I need also this program to send a packet every 80msec to a packet, how can I implement this? Maybe I can use a fork() and the child process simply write an ack in one of the file descriptor monitored b...

Getting unique rows/values in SQL

Getting unique rows/values in SQL. I have same some data like this valueA ValueB ValueC test "Value1" "Something" test "Value1" "Something else" test2 "Value1" "Something else" So then I want to get the first two rows since valueC is different and then I also want row 3. but say Row 4 is test "Value1" "Somethin...

how to do a select on like values from multiple columns in sql

I have two tables with columns: Genres: ID, genre Adjectives: ID, adjective_title I need to do a select that returns the matching values from both tables columns with the 'like' syntax. For example if "ep" was the value entered using 'like' the results would look like: result_column: epiphonic (from genres table) epic (from adjecti...