I have this table
<table class="results" id="summary_results">
<tr>
<td>select all</td>
<td>name</td>
<td>id</td>
<td>address</td>
<td>url</td>
</tr>
<tr>
<td>
<input type="checkbox">
</td>
<td>john doe</td>
<td>1</td>
<td>33.85 some address</td>
<td>http://www.domain.com</td>
</tr>
<tr>
<td>
<input type="checkbox">
</td>
<td>jane doe</td>
<td>2</td>
<td>34.85 some address</td>
<td>http://www.domain2.com</td>
</tr>
<tr>
<td>
<input type="checkbox">
</td>
<td>sam</td>
<td>3</td>
<td>33.86 some address</td>
<td>http://www.domain3.com</td>
</tr>
</table>
I would like to select all the rows then download the content of the urls knowing that each url is linked to the id. for example the first url will be www.domain.com?id=1&report=report
For example I have type:
CREATE TYPE record AS ( name text, description text, tags text[])
And table:
CREATE TABLE items ( id serial, records record[] )
How can I select all items with records with tags 'test' (without using PL/pgSQL)?
How can you select an element that has current focus?
There is no :focus filter in jQuery, that is why we can use something like this:
$('input:focus').someFunction();
I have Canine and CanineHandler objects in my application. The CanineHandler object has a PersonID (which references a completely different database), an EffectiveDate (which specifies when a handler started with the canine), and a FK reference to the Canine (CanineID).
Given a specific PersonID, I want to find all canines they're currently responsible for. The (simplified) query I'd use in SQL would be:
Select Canine.*
from Canine
inner join CanineHandler on(CanineHandler.CanineID=Canine.CanineID)
inner join
(select CanineID,Max(EffectiveDate) MaxEffectiveDate
from caninehandler
group by CanineID) as CurrentHandler
on(CurrentHandler.CanineID=CanineHandler.CanineID
and CurrentHandler.MaxEffectiveDate=CanineHandler.EffectiveDate)
where CanineHandler.HandlerPersonID=@PersonID
Edit: Added mapping files below:
<class name="CanineHandler" table="CanineHandler" schema="dbo">
<id name="CanineHandlerID" type="Int32">
<generator class="identity" />
</id>
<property name="EffectiveDate" type="DateTime" precision="16" not-null="true" />
<property name="HandlerPersonID" type="Int64" precision="19" not-null="true" />
<many-to-one name="Canine" class="Canine" column="CanineID" not-null="true" access="field.camelcase-underscore" />
</class>
<class name="Canine" table="Canine">
<id name="CanineID" type="Int32">
<generator class="identity" />
</id>
<property name="Name" type="String" length="64" not-null="true" />
...
<set name="CanineHandlers" table="CanineHandler" inverse="true" order-by="EffectiveDate desc" cascade="save-update" access="field.camelcase-underscore">
<key column="CanineID" />
<one-to-many class="CanineHandler" />
</set>
<property name="IsDeleted" type="Boolean" not-null="true" />
</class>
I haven't tried yet, but I'm guessing I could do this in HQL. I haven't had to write anything in HQL yet, so I'll have to tackle that eventually anyway, but my question is whether/how I can do this sub-query with the criterion/subqueries objects.
I got as far as creating the following detached criteria:
DetachedCriteria effectiveHandlers = DetachedCriteria.For<Canine>()
.SetProjection(Projections.ProjectionList()
.Add(Projections.Max("EffectiveDate"),"MaxEffectiveDate")
.Add(Projections.GroupProperty("CanineID"),"handledCanineID")
);
but I can't figure out how to do the inner join. If I do this:
Session.CreateCriteria<Canine>()
.CreateCriteria("CanineHandler", "handler", NHibernate.SqlCommand.JoinType.InnerJoin)
.List<Canine>();
I get an error "could not resolve property: CanineHandler of: OPS.CanineApp.Model.Canine". Obviously I'm missing something(s) but from the documentation I got the impression that should return a list of Canines that have handlers (possibly with duplicates). Until I can make this work, adding the subquery isn't going to work...
I've found similar questions, such as http://stackoverflow.com/questions/747382/only-get-latest-results-using-nhibernate but none of the answers really seem to apply with the kind of direct result I'm looking for.
Any help or suggestion is greatly appreciated.
$('#bit_IsModule').click(function () {
if ($('#bit_IsModule:checked').val() == "true")
$("#featurename").slideUp();
else
$("#featurename").slideDown();
});
I want to disable the first value in the select list on the checkbox click ? how can i do that
I have some valid select statements that when I send to MSSQL2005 sometimes return the error "Cursor not returned from Query".
How can I trace this and find out what's wrong?
Thanks
I want to do the following dynamically
Generate numbers from 1 to 100 and then select 25 random numbers from it and display it in a console. Any easy way to do so?
I have to query a view and include only those columns which are defined in the XML which comes as a parameter to my SP. Can i include that XML in select clause and extract all columns defined in that XML. Please tell a way to do this.
I have a sequence relationship:
A has many Bs.
B has many Cs.
C has many Ds.
They also make me so confused if there are more than 3 or 4,..tables.
So, how can i select all Cs that satify A.Id="1".
(something likes finding all grandsons of a grandfather)
Thanks in advance.
Is it real and how can I think about it.
To make so the user will select only the month and year, not date, because he need a period on full month, not some date.
here is simple control ...
<asp:TextBox ID="TextBox3" runat="server" />
<asp:CalendarExtender ID="TextBox3_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBox3" />
I have
[Person]
PersonID, EmailAddress, FirstName, LastName
[OnlineAccount]
OnlineAccountID, PersonID, Nickname
Each person is allowed to have 0-* OnlineAccount.
In entity framework with C#, how do I select the top 5 Person that has the most accounts?
Have a requirement to select the 7th column. eg:
cat filename | awk '{print $7}'
The issue is that the data in the 4th column has multiple values with blank in between. example - The last line in the below output:
user \Adminis FL_vol Design 0 - 1 -
group 0 FL_vol Design 19324481 - 3014 -
user \MAK FL_vol Design 16875161 - 2618 -
tree 826 FL_vol Out Global Doc Mark 16875162 - 9618 - /vol/FL_vol/Out Global Doc Mark
I need to fetch only first record (because I need last date) of resultset, at the moment I have this resultset from this sql tring:
SELECT BCACC,FLDAT
FROM ANAGEFLF
ORDER BY FLDAT DESC
and I see this record:
A.M.T. AUTOTRASPORTI SRL 20080220
A.M.T. AUTOTRASPORTI SRL 20080123
A.M.T. AUTOTRASPORTI SRL 20070731
APOFRUIT ITALIA 20080414
APOFRUIT ITALIA 20080205
APOFRUIT ITALIA 20071210
APOFRUIT ITALIA 20070917
APOFRUIT ITALIA 20070907
now I need to take only one record (first) for every BCACC, I would take this resultset:
A.M.T. AUTOTRASPORTI SRL 20080220
APOFRUIT ITALIA 20080414
I've just try group it for BCACC but I receive an sql error, I'm workin on DB2 ibmI
I am open iphone photo library from the my application.And i am selecting photo in squre shape.Its fine.But i want select photo in round shape.How it possible?
{"names": [
{"patientName": "Ratna"},
{"patientName": "raju" },
{"patientName": "krishna"},
{"patientName": "kishore"},
{"patientName": "Kishore1"},
{"patientName": "mahesh"}
]}
this is the JSON object i'm getting from Ajax call
so now i want to add all patientName values to select box through jquery
can any one tell me how to accomplish this ??
here i'm using $.ajax() function for ajax call
thanks in advance
I have a table like this
C1 C2 C3 Code
1 2 3 33
1 2 3 34
2 4 1 14
1 2 3 14
i want to select only those record whose code is appearing only in single row. ie, in this case rows with code 33 and 34.. as they appear only once in this table.
How can i write a query for that
My table looks like this with duplicates in col1
col1, col2, col3, col4
1, 1, 0, a
1, 2, 1, a
1, 3, 1, a
2, 4, 1, b
3, 5, 0, c
I want to select distinct col1 with max (col3) and min(col2);
so result set will be:
col1, col2, col3, col4
1, 2, 1, a
2, 4, 1, b
3, 5, 0, c
I have a solution but looking for best ideas?
ok what i want to do is to using forcollection["Selectlist"] only selected things in the select list will be availabe when the form posted i am using add ,remove mechanism in my listbox , so i want to make everything that is there in the checkbox as available to the forcollection["Selectlist"]. can it be done?
Hi folks,
I have a jComboBox that I am populating with some objects. The objects are of a type which I have made myself, and include a String and an int. The object's toString method returns the String, which is displayed in the Combo Box.
Now, I wish to select an item in the Combo Box with code. How do I do this?
There are multiple items starting with the same letter
Thanks
I want to select data from one table (T1, in DB1) in one server (Data.Old.S1) into data in another table (T2, in DB2) in another server (Data.Latest.S2). How can I do this ?
Please note the way the servers are named. The query should take care of that too. That is,
SQL server should not be confused about fully qualified table names. For example - this could confuse SQL server - Data.Old.S1.DB1.dbo.T1.
I'm using Terminal.app on Mac OS10.6.3, with gnu screen and zsh.
What I want to do is, see pwd(or an URL) in Terminal.app and double click on it, and select the whole path, to copy and paste after that.
But what I get now is a single directory name, because '/' is not treated as a word.
I found that iTerm has a setting to change it(iTerm - Preferences - Mouse - Characters considered part of a word), but is there any way to do this on my environment?
Does anybody know how dropdown list can be opened with trigger?
Here is code which doesn't work:
$('select').trigger('click');
Just for note - mousedown and mouseup also doesn't work.