select

Select All button WPF DataGrid

Hi, I was wondering if there is anyway of disabling the select all options on the top corner of the WPF DataGrid....this only seems to occur when I add a UserControl to a fixeddocument in WPF. Thanks in advance, U. ...

jQuery: Quick question. How to select string variable?

Hello world, EDIT: I would like to avoid doing something like this: var str = 'Hello'; if ( str == 'Hello') { alert(str); } I would rather do: var str = 'Hello'; $(str).filter(':contains("Hello")').each(function(){ alert(this) }); I've tried a lot of things: $(str).text().method1().method2().method3(); $(str).val(...

How to count two fields by using Select statement in SQL Server 2005?

Total records in table are 10. Select count(ID) from table1 where col1 = 1 (Result is 8) Select count(ID) from table1 where col1 = 0 (Result is 2) So its a same table but count is based on different condition. How am i gonna get two results (counts) using one select statement? Also Performance is a big concern here. PS: I am using ...

How to have current page selection using inludes navigation

I am using php includes to limit redundancy on my pages, how can I have my navigation have the current page selected with say a certain color for the HOME button when my navigation is called from a header.php file. If i were to say to add a "active" class to the home.php item and add a style so it looked different, that would happen acr...

How to select from datetime in sqlite?

Joined is a datetime data type column in the database and dates are saved as '12/05/2010 15:54:32' This my query: SELECT * FROM users WHERE joined BETWEEN '12/05/2010 00:00:00' AND '12/05/2010 23:59:59' ORDER BY id ASC But it doesn't work. It returns no rows. So how i gan get them? Solution: SELECT * FROM users WHERE joined ...

Want to avoid the particular rows from select join query... See description

I have a Select Left Join Query whis displays me the rows for the latest changedone(its a time) column name ("field" should not be equal) column name ("trackid" should not be equal), and column name "Operation should be "UPDATE" ", below is the query I am talking about... SELECT j1. * FROM jos_audittrail j1 LEFT OUTER JOIN jos_audittrai...

combining results of two select statements

I'm using T-SQL with ASP.NET, and c# and i'm pretty new to SQL. I was wondering how i could combine the results of two queries Query1: SELECT tableA.Id, tableA.Name, [tableB].Username AS Owner, [tableB].ImageUrl, [tableB].CompanyImageUrl, COUNT(tableD.UserId) AS NumberOfUsers FROM tableD RIGHT OUTER JOIN [tableB] INNER JOI...

SQL Server, Select CASE with different casting

I want to do a select that do a cast only for a specific ID but it doesn't seems to work. Example : SELECT CASE WHEN(@ID <> 1) THEN Code WHEN(@ID = 1) THEN Cast(Code AS int) END Code FROM .... Any Idea ? ...

alias some columns names as one field in oracle's join select query

Hi We are developing something like a social networking website. I've got task to do 'follow me' functionality. In our website objects are users, teams, companies, channels and groups (please don't ask why there are groups and teams - it is complicated for me too, but teams are releated to user's talent) Users, teams, channels, compani...

Submitting form with JavaScript on selector change

I have added some code to automatically submit the form when a selector is changed: <select name="template" id="templateselector" onchange='this.form.submit()'> {{foreach $templates as $t}} <option value="{{$t}}"{{if $t==$template}} selected="selected"{{/if}}>{{$t}}</option> ...

Is there a way to programmatically click on a combobox item?

Hi, I've been trying experiments with the following, but so far to no avail: sel = document.getElementById('myComboBox') sel.selectedIndex = 1; sel.options[1].selected = true; sel[1].click(); Thanks for the help! ...

How to do this query?

Hello everybody! I have a mysql table with these columns: ID (auto-increment) ID_BOOK (int) PRICE (double) DATA (date) I know two ID_BOOK values, example, 1 and 2. QUERY: I have to extract all the PRICE (of the ID_BOOK=1 and ID_BOOK=2) where DATA is the same! Table example: 1 1 10.00 2010-05-16 2 1 11.00 2010-05-15 3 1 ...

Datagridview error

I have two datagridviews. So for the second one, i just copy-pasted the code from the first and changed where the difference was. But i get an error at the secod data grid when i want to view the result of my sql code. Translated in english the error show something like that there was no value given to at least one required parameter. Pl...

Complex data ordering...

Hi, I have one tables ids in an array and they are ordered in the way I want and I have to select data from another table using those ids and in a order they are listen in the array. Pretty confusing but I was thinking of two solutions giving ORDER BY parameter the array but I do not know if that possible and another is to get all the ne...

select for update problem in jdbc

I'm having a problem with select for update in jdbc. The table i'm trying to update is the smalldb table, i'm having problems-- i'm using select for update which does a lock on the selected row the update statement is -- String updateQ = "UPDATE libra.smalldb SET hIx = ? WHERE name = ?"; the select statement is -- rs = stmt1.execut...

Honor Whitespace padding to display columns in fixed width <select>

I am trying to create the effect of columns in a dropdown by padding text with whitespace as in this example: <select style="font-family: courier;"> <option value="1">[Aux1+1] [*] [Aux1+1] [@Tn=PP] </option> <option value="2">[Main] [*] [Main Apples Oranges] [@Fu=$p] </option> <option value="3">[Main] [*] [Next NP] ...

How to Compute for ABCIndicator in T-SQL

I have a table of sales data for example: SELECT ItemCode, ItemDesc, TotalYearlySales, ShareOfBusiness, ABCIndicator FROM Sales WHERE Yir = Year(getdate()) AND Manth = Month(getdate()) ORDER BY TotalYearlySales DESC The ShareOfBusiness is computed as the Item's (TotalYearlySales/SUM(TotalYearlySales))*100 The ABCIndicator is A for th...

Nested Select in Rails

I am working on a Rails application which uses categories for items. My category model is self-joined so that categories can be nested: class Category < ActiveRecord::Base has_many :items # Self Join (categories can have subcategories) has_many :subcategories, :class_name => "Category", :foreign_key => "parent_id" belongs_...

select only rows if its value in a particular column is less than its value in the other column

Hi folks, I am using R and need to select rows with aged (age of death) less than or equal to laclen (lactation length). I am trying to create a new data frame to only include rows/ids whereby the value of column'aged' is less than its corresponding 'laclength' value. df: id1 id2 laclen aged 9830 64526 26 6 7609 64...

HTML Select, force direction down.

Is there a way to force the dropdown direction of a select element in HTML down? At the moment we have a product display page, the select box appears below the halfway mark of the screen in a widescreen resolution and therefore makes the dropdown go up. Is this possible? Thanks. ...