Need to get rows starting with digit e.g. '1test', '32 test'.
I tried
SELECT * FROM table WHERE name LIKE '[0-9]%'
as I used to do in MSSQL but it wasn't successful.
I've been looking in the web for examples on the aggregates like count but it seems all of them are using the aggregate alone.
SELECT field, count(*) FROM table GROUP BY field
Should have something like:
field.value1, x1
field.value2, x2
....
I'm looking for a pure JPA answer for this one. If not I guess I can then do further queries just for the count part but that seems unefficient.
Any ideas?
I have several select boxes and textboxes with the same class and I have the following statement.
if ($('.selTxtClass:visible').val() == "") {
$('.selTxtClass:visible').focus();
}
}
If I do an alert with ($('.selTxtClass:visible').val()) it comes as undefined.
I want to check that the value of these elements are empty, but I cant see what is wrong with this if statement, could you give me a hand, please?
Thanks a lot.
Hello,
I have been using the following CSS to apply an effect at the bottom of elements in a menu:
.leftMenuProductWrapper div:last-child{margin-bottom:20px;}
This works fine initially, however after adding more elements in the menu, I realized it was a problem. I really only want to select the last div with .leftMenuProductButton within .leftMenuProductWrapper
Anyway to do this without using Jquery, just pure CSS?
is there any method to get data from excel to sql ? i think that we can do without any writing C#codes. For example : select * from MyExcellFile.xls.Sheet1. Or may be any wizard in sql?
I want to check my database for records that I already have recorded before making a webservice call.
Here is what I imagine the query to look like, I just can't seem to figure out the syntax.
SELECT FROM (1,2,3,4) WHERE id NOT IN table.id
Is there a way to do this? What is a query like this called?
I want to search for numbers, but some of them have - characters or spaces inbetween them, is there a way to do like a
select numbersonly(phone) from table
?
Thanks.
I have one table bbc(country, region, area, population, gdp).
I want to select the regions with a total population of at least 100 million. How can I do it with SQL?
mysql> EXPLAIN SELECT * FROM urls ORDER BY RAND() LIMIT 1;
+----+-------------+-------+------+---------------+------+---------+------+-------+---------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+---------------+------+---------+------+-------+---------------------------------+
| 1 | SIMPLE | urls | ALL | NULL | NULL | NULL | NULL | 62228 | Using temporary; Using filesort |
+----+-------------+-------+------+---------------+------+---------+------+-------+---------------------------------+
The above doesn't qualify as efficient,how should I do it properly?
i am facing a problem in setting the combo property such that only user can select the values form given items but cannot write in the combo box,
how can i do so in c#?
thanx in advance.
I want to get parentElement when I select some text in iframe.
iframe = document.getElementById("iframe");
function getParentElement(){
var sel=iframe.contentDocument.getselection();
return sel.parentElement()
}
getParentElement();
when I run this code it show Error:" TypeError: iframe.contentDocument.getSelection().parentElement is not a function { message="iframe.contentDocument....ement is not a function", more...}"
Please give me a help!
Hi
I want to have a drop down menu where a user can select from several predefined options but i also want to give him the option of inserting a user specific value, i was thinking having one of the options as "user specific" which will in turn allow the user to insert a user specif entry in a text box that appears or is editable when user selects the "user specific" option. any one have any ideas how i can implement this is HTML and Javascript?
thank you
I've got a mysql query like this:
SELECT A.ID, A.NAME, B.ID, B.NAME
FROM table1 A
JOIN table2 B ON ( A.ID = B.TABLE1_ID )
WHERE
cond1, cond2, ..., condN
LIMIT 10
I've got many where clauses in query.
How to improve this query to get also full row count?
I don't want to use one more request without LIMIT.
I am working on a custom CRM form with numerous checkboxes, organized by sections. I would like to implement a 'select all' feature to the form and am trying to understand how to format the JavaScript. My research thus far has pointed me to the possibility of using a FOR statement to iterate through all of the elements in the section I want to process, setting their values accordingly, but am unsure of which document.getElements ... method to utilize.
How can I select only distinct elements for the XML document using XPATH?I've tried to use the 'distinct-values' function but it didn't work for some reason..
Hi,
I'm trying to write an MsBuild script to zip some files up. I need to select all of the read-only files recursively from a folder into an ItemGroup to add to the zip.
Is there anything around to do this out of the box, or do I need to write a custom task?
Thanks for you help.
Is it possible to load a short video file and - once loaded - select a specific frame and display that frame in a view? If there is no native support for this, how about an open source alternative?
Thanks in advance.
-Doug
Say I'm collaborating with someone via a git repository, and there is a particular file that I never want to accept any external changes to.
Is there any way for me to set up my local repo to not complain about a conflicted merge every time I git pull? I'd like to always select my local version when merging this file.
How can I select a random element in an std::set?
I naively tried this:
int GetSample(const std::set<int>& s) {
double r = rand() % s.size();
return *(s.begin() + r); // compile error
}
But the operator+ is not allowed in this way.