User talk:Tcncv

From Wikipedia, the free encyclopedia
Jump to: navigation, search


Table sorting with colspan[edit]

Hi. I came across some of your pages and responses while searching for table sorting with colspan. I am not sure whether you are the correct person to ask this question or not but then can we achieve sorting with colspan?

correlated subquery[edit]

sir i do not who you are!but i am very happy for your answer on correlated subquery execution.thank you very much. but i need your emailid.because i ahve so many doubts on this correlated query execution.i will post them to you.please give me your mail id.my mai id is phanihup3@rediffmail.com. — Preceding unsigned comment added by Phanihup (talkcontribs) 17:33, 12 June 2012 (UTC)

Hello Phanihup. I'd be happy to help if you have some specific follow up questions. You can post them here and I will try to respond when I can. I prefer not to share my email address. -- Tom N (tcncv) talk/contrib 02:48, 13 June 2012 (UTC)

hi sir!this is phanihup. Below there are two queries.query1,query2.last time you gave me explanation on how query1 gets executed.i was so happy to read it.it satisfied me.After that I tried to analyse another query (below query2).then I got some doubts.here I am writing those doubts.i am requeting you to give detailed explanation as last time.


Query1:( Select e.ename from employee e where exists(select ‘x’ from emp_company c where e.ename=c.ename and exists(select ‘x’ from company m where c.cname =m.cname and m.city=’bombay’));


Query2 (my doubts on this query executuion) Select e1.ename from employee e1 where e1.city in (select c1.city from c1 where c1.cname in (select m1.cname from emp_company m1 where m1.ename=e1.ename));


Doubts In first step of query1 ,one record of employee is considered In query 2 what happens?


In second step the considered record from main query is compared with every record of inner query in query1. What happens in query2?here in middle query ,( select in query c1.city from c1 where c1.cname), we are not referencing main query and there are no conditions.then how it behaves?does it return any list? To where it returns?


When inner query of query2 ,(select m1.cname from emp_company m1 where m1.ename=e1.ename));,gets executed. When list is returned from inner query of query2?what that list contains?to where it returns?


Finally I am asking you to give detailed explanation of query2.can you explain stap by step.?i hope you help me. thank you — Preceding unsigned comment added by Phanihup (talkcontribs) 18:45, 13 June 2012 (UTC)

Hello Phanihup,
There are no firm rules for analyzing complex queries. Many times you may need to consider the parts of a query in a different order than they are written. Often, there are many ways to write queries that do the same thing. Some forms may be easier to understand than others. I find it helpful to start by reformatting and indenting the query to make it easier to read and understand. I have done that below.
	/* Query 1 */
	SELECT e.ename
	FROM employee e
	WHERE EXISTS(
		SELECT 'x'
		FROM emp_company c
		WHERE e.ename = c.ename
		AND EXISTS(
			SELECT 'x'
			FROM company m
			WHERE c.cname = m.cname
			AND m.city = 'bombay'
		)
	);
I found the above hard to understand and harder to explain in the form provided, so I modified this query to use "IN" instead of "EXISTS" to define the relationships.
	/* Query 1 modified */
	SELECT e.ename
	FROM employee e
	WHERE e.ename IN (
		SELECT c.ename
		FROM emp_company c
		WHERE c.cname IN (
			SELECT m.cname
			FROM company m
			WHERE m.city = 'bombay'
		)
	);
Now I can interpret the query from the inside out:
  1. Find all the companies with city = Bombay (second nested query).
  2. Find all the employees who work at any of those companies (first nested query).
  3. Include those employee names in the results (top level query).
The result is a list of all employees who work in Bombay. The query can also be written without using nested queries.
	/* Query 1 rewritten */
	SELECT DISTINCT e.ename
	FROM company m
	JOIN emp_company c ON c.cname = m.cname
	JOIN employee e ON e.ename = c.ename
	WHERE m.city = 'bombay';
This should provide the same results. Note that because an employee might work for more than one company, I have added "distinct" to prevent listing any employee more than once.
Query 2 can be reformatted as follows. I have also also added the missing "company" table reference.
	/* Query 2 */
	SELECT e1.ename
	FROM employee e1
	WHERE e1.city IN (
		SELECT c1.city
		FROM company c1
		WHERE c1.cname IN (
			SELECT m1.cname
			FROM emp_company m1
			WHERE m1.ename = e1.ename
		)
	);
For this query, it is better to consider the second nested query before the first nested query. This is how I interpret this query:
  1. Consider each employee record.
  2. For each employee record, get a list of associated companies using the emp_company table (second nested query).
  3. For each associated company, get the company's city (first nested query).
  4. If the employee's city matches any of the cities for the associated companies, include that employee in the results.
In other words, list all the employees who work in the city where they also live. Note that the list of companies and cities considered is different for each employee. -- Tom N (tcncv) talk/contrib 06:07, 14 June 2012 (UTC)

oracle[edit]

hi sir finally i have understood correlated subquery execution.thank you very much? can i ask you doubts on other subjects?like java,c,c++,os...etc? — Preceding unsigned comment added by Phanihup (talkcontribs) 16:36, 16 June 2012 (UTC)

You can ask, but I may not be available to answer right away. You are likely to receive a quicker response if you ask your question at Wikipedia:Reference desk/Computing as you did before. I usually monitor that page as do many others. If I see an unanswered question on a topic where I am knowledgeable, I will often prepare and post a response. However, for many topics, other users will be more qualified to provide a useful answer. -- Tom N (tcncv) talk/contrib

happy[edit]

Hi! you are asking very interesting doubts — Preceding unsigned comment added by Me shankara (talkcontribs) 02:39, 1 December 2012 (UTC)

WTAR[edit]

Just curious if, since you first removed the call sign meaning on December 31, 2011‎, calling it a "prank" (thought first calling it that on April 1, 2008), if you had bothered to look up the sources for this before removing? Remember, the BURDEN of proof is on you, not me. You want sources, you gotta get 'em.

In your 2008 post on the WTAR talk page, you claimed you were a "47 year resident of [the area]". If you still live in Hampton Roads today, that would make you a 52 year resident. I think you can find your way to the area libraries and look up the information on microfiche and much easier than I or anyone else. - NeutralhomerTalk • 22:13, 3 November 2013 (UTC)

I respect your continued contributions, but I believe you have WP:Burden backwards. "The burden of evidence lies with the editor who adds or restores material, and is satisfied by providing a reliable source that directly supports the material" (my emphasis). The "We tow and repair" assertion did not and never did have a source citation. If you provide an article title and a date, I'd be happy to stop by the local library to check it out, but I am not going to sift through decades of microfilm with no starting point. -- Tom N talk/contrib 04:53, 5 November 2013 (UTC)
WTAR got those calls on July 15, 1997. I would check the Virginian Pilot, on microfiche of course, about a month before that date and go from there.
Just to kinda add to your BURDEN, you may remember back on April 2, 2008, you changed the callsign meaning, but didn't add a reference. You changed it back from "We Tow and Repair" to "Tidewater Area" several times. It's your BURDEN to prove which is the correct callsign meaning. If it was just one person saying it was one thing, unsourced, that would be a different story. But you have repeatedly said it is "Tidewater Area" without source.
Just to add, before you say I'm the one who added the "We Tow and Repair" callsign meaning, it was actually User:RealDeal4u back on May 11, 2006. I didn't start Wikipedia until that August. - NeutralhomerTalk • 07:19, 5 November 2013 (UTC)