how can i find the first word in my sentence having 'w' character.This character can be present anywhere in my word.example of sentence "Hi xyzwy! what are you doing here?" So the result should be "xyzwy".
...
I have objects that has a DateTime property, how can i query for the oldest object?
After asking on db4o forum, I get the answer:
It's quite easy: create a sorted SODA-Query and take the first / last object from the resulting ObjectSet. Don't iterate the ObjectSet (therefore the objects won't be activated), just take the required objec...
Hi
I need help with query to find all the dates that between 31/12/2009 and 31/02/2010
In SQL Server 2008
i try this:
SELECT convert(varchar(50), MyDate, 103)
where convert(varchar(50), MyDate, 103) >= '31/12/2009' and convert(varchar(50), MyDate, 103) <='31/02/2010'
but it give me wrong result
why ?
...
I keep getting an "Notice: Undefined index: did" error with this query, and I'm not understanding why... I'm much more used to mysql, so, maybe the syntax is wrong?
This is the php query code:
function get_demos() {
global $session;
$demo = array();
$result = pg_query("SELECT DISTINCT(did,vid,iid,value) FROM dv...
Lets say I've got a table listing car brands or models:
Cars:
Id | Brand
-----------
1 | BMW
2 | Audi
3 | Volvo
And I've also got another table which links features.
Link:
Id | carid | featureid
-----------------------
1 | 1 | 1
2 | 1 | 2
3 | 2 | 2
4 | 3 | 1
5 | 3 | 2
6 | 3 | 3
And I've got the tab...
I have a declarative table defined like this:
class Transaction(Base):
__tablename__ = "transactions"
id = Column(Integer, primary_key=True)
account_id = Column(Integer)
transfer_account_id = Column(Integer)
amount = Column(Numeric(12, 2))
...
The query should be:
SELECT id, (CASE WHEN transfer_account_id=1 T...
Suppose I have a column with words:
orange
grape
orange
orange
apple
orange
grape
banana
How do I execute a query to get the top 10 words, as well as their count?
...
hi
i have Database in access Id,Fname
i need to sort this database (by Id) and save the new sort (update the table)
how i can sort & update ?
thank's in advance
...
I have a query which I am executing through ODBC on an Informix database. The query is being passed a Parameter (StartDate). I need to use the year of the StartDate numerous times get the data from the correct fields. When I use the query as listed below, it thinks there are 9 parameters. Therefore, I know this syntax is incorrect, h...
So I made a query like this
global $connection;
$query = "SELECT *
FROM streams ";
$streams_set = mysql_query($query, $connection);
confirm_query($streams_set);
in my DB there are filds
ID, UID, SID, TIME (all INT type exept time)
So I am triing to print query relult into form
<form>
<select class=...
I'm trying to enter values into a database table using a form and a PHP function. The PHP seems to be fine as the SQL statement it creates looks okay, but the database always throws up an error. This is the SQL statement that my code has generated (with arbitrary values):
INSERT INTO Iteminfo ('itemName', 'itemSeller', 'itemCategory', '...
I'm interested in finding the most precise decimal values in a database field. I'd like to be able to sort results by descending precision. Is this possible?
e.g.
10.1781253
12345.12435
89.763
1.1
2
...
hi
i have Database with date field.
i see the time like: 1900-01-01 13:38:00.000
how i can see it like: 13:38 ?
(i work on sql server 2008)
thank's in advance
...
I have a mysql table for votes. there's an id, a project_id and a vote field (which is 1 if a specific project is voted). now i want to generate a ranking from those entries. is there a way to get the number of votes for each project_id and automatically sort the entries by the number of TRUE votes of a project with a single mysql query?...
When measuring performance on my query I came up with a dependency between isolation level and elapsed time that was surprising to me
READUNCOMMITTED - 409024
READCOMMITTED - 368021
REPEATABLEREAD - 358019
SERIALIZABLE - 348019
Left column is table hint, and the right column is elapsed time in microseconds (sys.dm_exec_query_stats.tot...
For a utility I'm working on, the client would like to be able to generate graphic reports on the data that has been collected. I can already generate a couple canned graphs (using ZedGraph, which is a very nice library); however, the utility would be much more flexible if the graphs were more programmable or configurable by the end-use...
Hi, is it possible to make something similar to the following with Postgresql without using a function?
pseudo sql code:
select * from sometable where somecol = somevalue AND someothercol IN exec( 'select something from exclusionlist' )
My primary intention is to build up a table with predefined queries to call inside a where clause
...
In my users_subjects table, I have a user ID and a subject ID. When a user (of admin level) creates a subject they select from a drop down menu a project. Here is the select query to draw up appropriate values:
$sql = "SELECT users_subjects.users_subjectsid, subjects.subjectn FROM subjects JOIN users_subjects on subjects.subjectid = us...
I'm trying to do a query through NHibernate where the criterion for the result depends on a referenced table. How do I do this? Let's look at a simple example:
public class Foo
{
public int Id { get; set; }
public string Name { get; set; }
public Bar ReferencedBar { get; set; }
}
public class Bar
{
public int Id ...
I've got a function written by another developer which I am trying to modify for a slightly different use. It is used by a SP to check if a certain phrase exists in a text document stored in the DB, and returns 1 if the value is found or 0 if its not. This is the query:
SELECT @mres=1 from documents where id=@DocumentID
and contains(...