Search Results

Showing results 1 to 24 of 24
Search took 0.00 seconds.
Search: Posts Made By: cgyrob ; Forum: Oracle and child forums
Forum: Oracle Oct 20th, 2009
Replies: 5
Views: 2,164
Posted By cgyrob
@arjun0 - If you want your questions answered you need to start a new thread.
Forum: Oracle Oct 16th, 2009
Replies: 2
Views: 979
Posted By cgyrob
You can use this to get current date at midnight.


Select to_char (trunc(SYSDATE), 'MM-DD-YYYY HH:MI:SS') from dual;


Just google Oracle Date functions if you want something more specific.
Forum: Oracle Oct 14th, 2009
Replies: 6
Views: 928
Posted By cgyrob
try assigning to a variable then select into


sname1 stu.sname%TYPE;

sname1:= :new.sname

SELECT :NEW.sno, UPPER('sname1'), :NEW.class
INTO sno1, sname1, class1 FROM dual;
Forum: Oracle Oct 14th, 2009
Replies: 6
Views: 928
Posted By cgyrob
Really not sure why upper() is not working for you.

Maybe trying using the upper() function on the insert.


INSERT INTO stu VALUES(sno1,upper(sname1),class1);
Forum: Oracle Oct 13th, 2009
Replies: 6
Views: 928
Posted By cgyrob
Try using select into


Select :NEW.sno, UPPER(:NEW.sname), :NEW.class
into sno1, sname1, class1 from dual;
Forum: Oracle Sep 23rd, 2009
Replies: 14
Views: 2,354
Posted By cgyrob
When you have a higher reputation you get more greeen squares in your header file (I guess it is supposed to signify how competent the responders are) as well I think it might have a reflection on...
Forum: Oracle Sep 23rd, 2009
Replies: 14
Views: 2,354
Posted By cgyrob
By only doing subqueries you basically created a cartesian join. It displayed a record for every possible permutation of the query.

There is a simple explantion of cartesian (cross joins) here.
...
Forum: Oracle Sep 23rd, 2009
Replies: 14
Views: 2,354
Posted By cgyrob
What rownum = 1 is doing is returning only the top row of employee information for each job_id. without the rownum =1 the query will return all matches which is why you get the error message.
...
Forum: Oracle Sep 22nd, 2009
Replies: 14
Views: 2,354
Posted By cgyrob
I know it is possible as I have done similar queries in the past using subqueries. I provided something I put together quickly, not a very good example but it does accomplish what you were inquiring...
Forum: Oracle Sep 22nd, 2009
Replies: 14
Views: 2,354
Posted By cgyrob
I'm not quite sure what you are trying to achieve.

If you just want the job_id then grab it seperately, if you want to see all the employees associated which each job_id you have to return all...
Forum: Oracle Sep 21st, 2009
Replies: 14
Views: 2,354
Posted By cgyrob
Try something like this.


SELECT DISTINCT emp.Job_ID, a.Employee_ID, a.Last_Name
FROM Employees emp
Join (Select job_id,employee_id,Lastname
From Employees)a on emp.Job_id = a.Job_id...
Forum: Oracle Aug 10th, 2009
Replies: 3
Views: 593
Posted By cgyrob
This should work for you.


update employee set salary = case
when salary < 100000 then salary * 1.10
when salary >= 100000 then salary * 1.15
End;
Forum: Oracle Jul 26th, 2009
Replies: 3
Views: 408
Posted By cgyrob
I am not quite sure what you want your final result to look like?

The join i provided would give you the following result

TOP10 | 510 | TASKNAME 1 | 6 | YEAR 2008
TOP10 | 510 | TASKNAME 1 | 6...
Forum: Oracle Jul 24th, 2009
Replies: 13
Views: 2,279
Posted By cgyrob
@anubina why are you re-treading old threads.

You already provided the inline view solution for this thread so why are you re-iterating your own solution?
Forum: Oracle Jul 24th, 2009
Replies: 3
Views: 408
Posted By cgyrob
Just use a join query. Sub query to just pull fields is not required.


Select a.Seq, a.An, a.NET_Id, a.DES, b. Short
From Activities a, Codeset b
Where a.R11 = b.code
Forum: Oracle Jul 23rd, 2009
Replies: 6
Views: 508
Posted By cgyrob
Mamtha,

If this solved your question can you please mark the thread solved.

thanks.
Forum: Oracle Jul 23rd, 2009
Replies: 6
Views: 508
Posted By cgyrob
Yes intersects work well and are much more readable.
Forum: Oracle Jul 23rd, 2009
Replies: 6
Views: 508
Posted By cgyrob
Try something like this


Select customer from Table
Where purchasedate between trunc(sysdate,'MM') and LAST_DAY (TO_DATE (trunc(sysdate,'MM')))
and product = 'ABC'
INTERSECT
Select customer...
Forum: Oracle Jul 23rd, 2009
Replies: 6
Views: 508
Posted By cgyrob
I think we would need a little more details to what you are asking.

Do you want a list of all customers that purchased a specific product in the current month only IF they had purchased the same...
Forum: Oracle Jul 14th, 2009
Replies: 13
Views: 2,279
Posted By cgyrob
There is no Top in Oracle. That is SQL Server syntax.
Forum: Oracle Jul 13th, 2009
Replies: 4
Views: 607
Posted By cgyrob
If you are inserting data from other tables you can use a select statment


Insert into customer(c_id,c_name,c_city,c-street)
Select c_id, c_name,c_cit, c_strett
From Table(s)
Where Conditions
Forum: Oracle Jul 2nd, 2009
Replies: 3
Views: 1,248
Posted By cgyrob
If you are new to SQL and want to learn you can google 'SQL Tutorial' and should be able to find hundreds of tutorial from basic to advanced.

If you don't have any coding experience the 1st option...
Forum: Oracle Jul 2nd, 2009
Replies: 3
Views: 1,248
Posted By cgyrob
There are a few ways to do this.

1. When you choose your connection and the report wizard runs you can pick your table, then it will ask you which fields you want to include from those tables.
...
Forum: Oracle Jun 30th, 2009
Replies: 1
Views: 539
Posted By cgyrob
Not sure what you are asking. This statement will most likely return an error. (Multiple values returned when expecting single value)

To make it work you will either have to use an "in" instead of...
Showing results 1 to 24 of 24

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC