select

Return unlocked rows in a "select top n" query

I need to have a MsSql database table and another 8 (identical) processes accessing the same table in parallel - making a select top n, processing those n rows, and updating a column of those rows. The problem is that I need to select and process each row just once. This means that if one process got to the database and selected the top ...

How to edit 'onchange' attribute in a 'select' tag? (using jquery)

I'm trying to edit the 'onchange' event of an existent 'select' element. For example purposes I have the following code: <select id="sel_id" onchange="javascript:foo();" > and whenever I try to change its 'onchange' attribute I was using the following: $("#sel_id").attr("onchange", "foo_2()"); FYI, this code which should be f...

Generating duplicate responses within a MySQL SELECT query

I am using the report writing functionality within an application to generate barcode product labels. The report writing system allows me to use a MySQL SELECT statement to get the information I need from our database and present it to a Jasper Reports JRXML file that formats the report. This works fine if I want to produce one barcode...

Loading database at start up slows down the app...

Hello, i m not sure how to describe this as i m new with all the developing and i m really looking forward to an answer from you guys. I know you can be very busy but please try to HELP me! Here it goes. I have an app that loads a very large database (although it only has 100 entries it contains HiRes images (100MB) ). At start up a ta...

jQuery how to get select change work in multiple form?

I got this script from here $(document).ready(function() { $('#choose').change(function(event) { $.post('select-ajax.php', { selected: $('#choose').val() }, function(data) { $('#update').html(data); } ); }); }); <form id='form'> <div id="update"></div...

select() doesn't wait

Hi, I've to read program log file and to do that I wanted to use select() and read() #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/select.h> #include <fcntl.h> #include <stdio.h> int main() { int fd = -1; fd_set fds; struct timeval tv; int rc; char buffer[4096]; char * log_path = "/...

.val() doesn't set value for select (jQuery)

$('.reset').click(function () { $('select[name=one]').val(opt2); });​ JSFiddle here. What should I change? Thanks! ...

Return a subset of rows with a complex order by in T-SQL

I have a stored proc select statement that lookes like that: SELECT p.ID AS ID, p.Title AS Title, p.Text AS Text, p.CategoryID AS CategoryID, p.PostDate AS PostDate, p.Author AS Author, p.AuthorID AS AuthorID, p.IsApproved AS IsApproved, p.Rating AS Rating, p.RatesCount AS RatesCount, t.Text A...

How to implement a selection menu on the iPhone

How do I implement this menu in the iPhone SDK? http://www.simplemobilereview.com/wp-content/uploads/2010/03/iphone-way.jpg ...

Select all options in select

I have a multiple select. How can make, that all options will be selected always? Or how make a selecting all options ob submit. I have only class of select(not ID). ...

select top records later records

hi , i want to select top 500 records later records (i.e from 501 records) to till another 100 records. ...

If Logic in a SQL Statement

What I'm trying to do should be very simple but somehow I can't reach the right answer to my problem. I've asked something similar in the past but the answer given to me previously no longer fits the requirements. So here's what's going on - I need to conditionally select values from a table in my database in a different than the usual m...

identify select drop-down text using jquery $(this)

I've got several select elements on a page e.g. <select class="dd" id="dropdown1"> <option value="123">Option A</option> <option value="234">Option B</option> </select> <select class="dd" id="dropdown2"> <option value="456">Option C</option> </select> etc etc I would like to use jquery's $(this) to identify which of the s...

help with this Rails code, plz (select and javascript)

hi guys, this is what I wanna do. i need to have a select with options and javascript in each one, **select...%>** <% @buscar.each do |j|%> <option value="<%= j.cedula_tutor1 %>" onclick="Datos2('j.cedula_tutor1');"> <%= j.cedula_tutor1 %> </option> <%end%> **</select>** this is what I has made in rails... <%=select("cedula_tuto...

How to iterate through a fd_set

Hello. I'm wondering if there's an easy way to iterate through a fd_set? The reason I want to do this is to not having to loop through all connected sockets, since select() alters these fd_sets to only include the ones I'm interested about. I also know that using an implementation of a type that is not meant to be directly accessed is ge...

Alternative to chained selects

I've been trying to use chained selects for a registration form, but have given up hope on them ever working in IE8. Does anyone know of another method for dynamic form-fields? Basically I need the user to select type 1 or type 2 and have type 1 populate a dropdown with options ABC and type 2 populate a dropdown with options XYZ. ...

Jquery: Select full href with a 'contains' method.

Hi to all, Is it possible using jQuery to select one full link which href contains another variable? My code is: var element1 = $(".not-viewed").parents('li').attr("id"); var element2 = $(".videoTitle").attr("href"); Where i need to select a full link that contains 'element1',because there several videos in the page.In my code sele...

JQuery: Select multiple select tags of a name

I'm trying to access all my select tags with a specific name. I've tried doing this: $("select[name='blah']") and $("select[name='blah[]']") but neither are working. I followed the JQuery documentation that showed it doing it like this for inputs: $("input[name='newsletter']") What am I doing wrong? Thanks ...

How can I return multiple identical rows based on a quantity field in the row itself?

I'm using oracle to output line items in from a shopping app. Each item has a quantity field that may be greater than 1 and if it is, I'd like to return that row N times. Here's what I'm talking about for a table product_id, quanity 1, 3, 2, 5 And I'm looking a query that would return 1,3 1,3 1,3 2,5 2,5 2,5 2,5 2,5 Is this possi...

SQL/JDBC : select query on variable tablenames

Hi all, I'm using Oracle DB and I would like to write a SQL query that I could then call with JDBC. I'm not very familiar with SQL so if someone can help me, that could be great ! Here is the problem. I have a table MY_TABLE wich contains a list of another tables, and I would like to keep only the nonempty tables and those that their na...