- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 2
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 2
26 Posted Topics
debasisdas has posted good link @Anuradha Mandal - atleast try to put some effort to read it ... you can post problem, if you are getting any to write this scheduling or anything else (although this thread has not started by you)....
you are getting multiple rows there in line number 19. that's why this error is generating do one thing -- add following query at line number 16 for this kind of multiple row fetching you have to use cursor ... you can't give these multiple value to a variable by …
you can do one thing... just take union on all table having max(date) condition in every sub union query.. so that by this different different sub query you will get latest date row/rows. now about count(*) ... this you have to do in different sub query... i can write a …
Yes it is allowed to use outer query data inside the inner query also... i am not sure about joins (and in on clouse) .. according to my view you can use this condition (table2.project_id=table1.id) in where condition !!! you don't have any join condition here okay then --- [CODE] …
great urtrivedi, nice R&D on above post.. and @andylbh If you are not sure about duplicacy in your table as urtrivedi told in his post then you can use following query [CODE] SELECT SUM(dist) FROM distance dd, tripleg t WHERE (((t.origin=dd.destination AND t.destination = dd.origin) and not (t.origin=d.origin AND t.destination …
Hi Tunnleram, please see your pasted code carefully. you missed g.name in group by clouse what you have to put in. just edit your ccode it should run. or else you can put following code also. [CODE] SELECT g.id, g.name as game, (select count(*) from person where favorite_game_01 =g.id or …
hi laokn, you can extract this information appling following query also.. [CODE] SELECT a.id, a.DATE, a.value, (select SUM(b.value) from 'tablename' b where a.DATE > b.DATE) prev FROM `tablename` a [/CODE]
DIRECTLY ..... as how you compare int same equal sign " = " you can apply in dates also... simple ... :)
HI sakush100, while appling union with two table you should have same data type in column order so you have to check your data table structures first .... this could be a problem.... please paste here structures of these tables here.. see [URL="http://www.php.net/manual/en/function.mysql-query.php"]php : mysql_query [/URL] if this function fails …
just try this.......... [CODE] #include <stdio.h> const int SIZE = 10; int a[SIZE]; int main() { int i; printf("Enter salaries"); for (i=0;i<SIZE;i++) { printf("%d: ",i); scanf(%f,&a[i]); } //updating salaries - with 20% increment for(i=0;i<SIZE;i++) a[i]=a[i]*1.2; //Finding max as well as well as printing new salaries also int pos=0; float max …
i think one solution is put self join on foodorders.. in second foodorders table extract data only for this date... and join with outer join... one more thing put distinct Diner, Restaurant, ODate in first query else it would give multiple records of same name and restaurent enjoy coding :-)
there is a problem started from first normal form:- you have one table Wedding Gust 1 {Gust ID (PK), Gust Name, Attending Event, Seat at Dinner, Notes} having many to one relation with Wedding 1 {Wedding Number (PK), Bride Name, Groom Name, Client, Date} table (as shown in diagram) please …
hi hfx642, as we desired same food on the same day in the same restaurant .. think of this output this query will give group of (Diner, Restaurant, ODate, Food )combination... means only one food can be there in this output for perticular diner,restaurent,date combination then your above suggested query …
Hi pczafer, i think you have to again think about your wuery what you have posted last time. [CODE] SELECT first_name, last_name FROM employees WHERE EMPLOYEE_ID in (SELECT manager_id from ( select manager_id,count(*) cnt from employees group by manager_id) where cnt >9 -- this part you can modify as you …
in your function day_ord_sf you have to replace bb_basket table name with dummy table dual. it is because you are already giving date value as perameter in your function. right ?? so why you need to extract value from your bb_basket table in your function (actually it is a wrong …
Hi hannon565, In select ... into ... what happen if it return more then one row?? SELECT INTO raised a TOO_MANY_ROWS exception. that's why it will return false value which is default for boolean data type... if you are sure that in your database you have only one row for …
good logic @Buffalo101. But you have forget one thing to compare node number in both the list. @rockerjhr please add this line in above algorithm in first position if number_of_first_list is not equal to number_of_second_list then return (false) // means lists are not same.. else /* that code for checking …
Hi fadia, In my knowledge you can solve this problem by just one modification.. do one thing just change datatype of your expected first column from int to number number is the datatype for integers in oracle as you want to create table in oracle.. right?? definately after this it …
it is very simple [B]nychick[/B] okay lets take an ordinary table structre having information about first name and last name of some persome table_name = person ------------------ first_name last_name ..... .... .... (so on some more table columns) ------------------- so for what you want you have to write following query …
hi JerieLsky, can you please look at your table structure once again..?? PATIENT: PK - PatientNo - FirstName - LastName - MiddleName - Address - Age FK - PageNo [B]i think you need one more column here having information about book no[/B] just think about this ... page no is …
same way, you can use q'[] function here to solve your problem. as given by [B]ubecdaniweb [/B] select replace(q'[&test]','''','') from dual;-- for remove wuote from test variable but, as you questioned, you want to add one more single quote here so you can use following query.. select replace(q'[&test]','''','''''') from dual;
you can create three different different triggers for Insert / update / delete respectively... this type of design helpfull in tracking as well as modification for a perticular instance also....
Hi maichy, first thing if were using same code as your last post, please recheck it. you have to take care of quotes as in line 2 you didn't close that quote and bracket also. I think only this kind of small mistakes only lead you for blank pages.. (as …
Good debasisdas sir, i think he is talking about following trigger [CODE]create or replace trigger dvd_before_insert before insert on dvd_table for each row declare v_s_no number; begin select (select count(s_no) from test_dvd where dvd_name=:new.DVDname)+1 into v_s_no from dual; :new.NoOfCopy :=v_s_no ; end;[/CODE] It will solve your problem without any problem …
can you please explain - in which format you want this data?? if you want email concatenating with name, you can simply use "||" (without quotes) like [CODE] select lower(trim(email)) || lower(trim(name)) from mail;[/CODE] or if you want in separate columns then you need to replace "||" with "," only(again …
it is very simple and by a single query solve this problem without using division operator (i am sorry if i didn't understand your question currectly, if you want to solve this only by the help of division operator) [CODE] select * from student where id not in --[B](1)[/B] (select …
The End.
pratik_garg