What is a candidate row when talking about Oracle and SQL? Using it in a sentence would be as such:
"The candidate row is fetched from the table specified in the outer query."
I want to replace a xml node that is not a child of the root element. how can I do it - not in .Net 3.5?
I don't know the exact path to the node I want to replace, I get the node by XPath query like :
XmlElement root = doc.DocumentElement;
oldItem = root.SelectSingleNode("//Node1[@name='aaa']//Node2[Item='bbb']/Value");
how can I replace this olditem?
I have table similar to the following:
Year | Product | Value
2006 A 10
2006 B 20
2006 C 30
2007 A 40
2007 B 50
2007 C 60
I would like a query that would return the following comparison
Product | 2006 Value | 2007 Value
A 10 40
B 20 50
C 30 60
What are the options to do so? Can it be done without joins?
I'm working with DB2, but answers in all SQL types would be helpful.
I am using SQL Server 2008 and we are using the DMV's to find missing indexes. However, before I create the new index I am trying to figure out what proc/query is wanting that index. I want the most information I can get so I can make informed decision on my indexes. Sometimes the indexes SQL Server wants does not make sense to me. Does anyone know how I can figure out what wants it?
I have an Incident table with one row that has the value 'out of office' in the Description column.
However the following query does not return that row.
SELECT * FROM Incident
WHERE CONTAINS( (Incident.Description), '"out*"' )
The word 'out' is not in the noise file (I cleared the noise file completely).
Is it because SQL Full-text search does not index small words? Is there a setting for that?
Note: I'm on SQL 2005.
am doing one project using vb6.0+access+crystal report8.5
some error occur during the crystal report.
Query Name
seqquery:
SELECT segment_trans.division_name, sum(segment_trans.Total_value) AS total, division_master.Target
FROM segment_trans, division_master
GROUP BY segment_trans.division_name, division_master.Target;
crystal report percentage formula:
{(seqquery.total * 100) / seqquery.Target }
Error: This field name is not known.
note: Total_value and Target field's datatype "Text"
how to solve this ?
please help me.
Thanks
Sathik
I have the cursor with the query statement as follows:
cursor.execute("select rowid from components where name = ?", (name,))
I want to check for the existence of the components: name and return to a python variable.
How do I do that?
I have following statement for query articles from some sections
Article.all(:joins => :sections, :conditions => { :sections =>{ :id => [3, 4, 6, 7, 8, 9] }, :id_not_in => @some_ids }, :limit => 4)
Variable @some_ids is array with ids of articles wich must be excluded from result.
I need a query to return this result:
+---------+-----+-------+
| ref_nid | nid | delta |
+---------+-----+-------+
| AA | 97 | 1 |
| BB | 97 | 2 |
| CC | 97 | 3 |
| DD | 98 | 1 |
| EE | 98 | 2 |
| FF | 98 | 3 |
+---------+-----+-------+
However, I do not have the delta column. I need to generate it for each nid group.
In other words, I need an auto incremented number for each group of the result.
Say I have these tables:
people(id, name),
cars(person_id, car)
and this query:
SELECT c.car
FROM people as p, cars as c
WHERE c.person_id = p.id
AND p.id = 3
I want the c.car column to take its name from the name field in the people table, like this (invalid SQL, just to illustrate):
SELECT c.car AS(SELECT name FROM people WHERE id = 3)
How do I do that?
Hi,
I am writing the SPQuery for getting the data in contact list of sharepoint site.but how to write that?
Means I want to retrieve data as :
Name:aaa
Cell No: 13123131
Address : something address here..
so on...
of given LAst Name in search text box (build by me).
how to do that? Means what query i have to write? (Syntax please).
hi
I am using crystal report for get a report . I have two table , table1 and table2.
Primary key of table2 is foreign key of table1, I set some field in my report file to show the data of table1 and I want to show a specefic field of table2 insted of a field that is foreign key of table1, What is the query of LINQ for this problem?
I have two different QuerySets which both return a list of Users (with different fields). How can I display them both in one HTML table? One Query will always be a subset of the other; I just want to fill in the missing data with 0s. How can I do this?
I have a MySQL table with a column called "priority". The column can have two values: high or low. I want to select 8 records from the table at random, but I want 6 of them to be high priority, and 2 of them to be low priority. If possibly, I would like to do it in one SQL statement. Is there any way to do two LIMITS in one query based on this kind of criteria?
Hello friends,
How can i prevent user to enter any url or link in contact form text area, i have tried it with this but its not working -
if (!isset($_POST['submit']) && preg_match_all('/<a.*>.*<\/a>/', $_POST['query']))
{
echo "<h1 style='color:red;'>HTML Tag Not allowed </h1>";
}
else {
//sendmail
}
Please help me
I have what I think is a very simple problem (famous last words)...
I have a Category model that has_and_belongs_to_many Events. I want to construct a simple and efficient query that finds all categories that have 1 or more events. (using Rails 3)
I'm sure I'm having a dumb moment here - any help appreciated :)
You know how if you type links: "yourwebsite.com" into the normal google search box, it tells you the number of sites linking to you and their addresses.
How can I do it programmatically with php? Does google provide an api that can I can programmatically query? What are my options?
timeGetTime seems to be quite good to query for system time. However, its return value is 32-bit only, so it wraps around every 49 days approx.
It's not too hard to detect the rollover in calling code, but it adds some complexity, and (worse) requires keeping a state.
Is there some replacement for timeGetTime that would not have this wrap-around problem (probably by returning a 64-bit value), and have roughly the same precision and cost?
hi, someone can tell me how to do this query in EF1:
select a.idAnimali, a.titolo, a.commenti, a.ordine, a.idcatanimali, table1.nomefoto FROM tabanimali as a LEFT JOIN
(SELECT idanimali, nomefoto tabfotoanimali FROM LIMIT 1) AS Table1
On a.idAnimali = table1.idanimali
WHERE a.idcatanimali = idcatanimale
Thanks
I have some php code, that execute for a very long time.
I need to realise next scheme:
User enter on some page(page 1)
This page starts execution of my large PHP script in background .(Every change is writting to database)
We sent every N seconds query to database to get current status of execution.
I don't want to use exec command because 1000 users makes 1000 php processes. It's not way for me...
Any one help me to create a trigger for auto increment fld_id and Unix datetime. My table field is fld_id(int),fld_date(number),fld_value(varchar2).
My insert query is
insert into table (fld_value)values('xxx');
insert into table (fld_value)values('yyy');
I need the table record like this
fld_id fld_date fld_value
1 1354357476 xxx
2 1354357478 yyy
Please help me to create this.I can't able to do this..
I have the cursor with the query statement as follows:
cursor.execute("select rowid from components where name = ?", (name,))
I want to check for the existence of the components: name and return to a python variable.
How do I do that?
I have two tables. First with points, and second with polygons. I need to find out which points are in required polygon according to the attribute gid.
Using query: SELECT table1.* FROM table1, table2 WHERE table2.gid=1 AND ST_Contains(table2.geom2, table1.geom1);
What I get is empty table (only columns without data)...
Tnx