Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF Oracle


What should be the right SQL query  

My table is: Code: EMP_NUM EMP_FNAME EMP_LNAME JOB ... Continue Reading
Views : 34
Monday 31st of December 2012

Mutliple table query returning duplicates with wrong values  

These are the tables I'm working with: Code: SQL> desc custinfo; Name ... Continue Reading
Views : 24
Monday 31st of December 2012

How to check for VSS support of a oracle instance  

Hi,From the VSS backup & restore document, it is said that currently Oracle VSS writer service does not support VSS for oracle database configure with ASM, RAW file system, OCFC, ACFS, NFS.Also it does not support RAC with the above config.Is there any way to... Continue Reading
Views : 152
Monday 31st of December 2012

How to add a sequence column to an existing table with records  

Hello,I had created a new table named USERLOG with two fields from a previous VIEW. The table already consist of about 9000 records. The two fields taken from the VIEW, i.e. weblog_views consist of IP (consists of IP address), and WEB_LINK (consists of URL). This is the code I... Continue Reading
Views : 34
Monday 31st of December 2012

Help Needed / Appreciated...  

Hi I have this query : Select Inv.ItemId As Item, Sum(Inv.RowTotal) As TotSales, Sum(Qty) as ItemQty, (Select Sum(Qty) From Invoice) As TotQtyfrom Invoice Inv Group by Inv.ItemId It returns :Item ... Continue Reading
Views : 86
Sunday 30th of December 2012

Weekly Refresh Group  

Hi all.I have various refresh groups that start every day at the same time. In the script I have specified Code: Continue Reading
Views : 33
Sunday 30th of December 2012

Data migration from WORD to ORACLE  

I have a long file in WORD as I try to load it in ORACLE quotes become periods, ex:insert into mytab values ('myname, 26);when i copy this and paste it in oRACLE (UNIX environment), it translates asinsert into mytab values (.myname.,26)..does not recognize the quotes Continue Reading
Views : 40
Sunday 30th of December 2012

Updating millions of rows in a batch  

Sooo, I have a table which has plenty of rows. In production, I would estimate it to be from 30 millions to 300 millions. I need to update on column (flag) in all the rows (created before certain date).Now saying just: Continue Reading
Views : 42
Sunday 30th of December 2012

Help with a if statement  

hey guys, i'm new here and am stuck with a bit of sql.i've got a project and im wondering whether it is possible to create an if statement that says something like"If column A is NOT NULL then column B cannot be NULL"would I have to do this as a trigger... Continue Reading
Views : 24
Sunday 30th of December 2012

Single-row subquery returns more than one row  

I can't seem to wrap my head around this problem I'm having with a query. I need to update all rows in my ps_ntsr_gf_stufile tables with the concatenated values from the ps_classes_tbl table where a.CLASS_NBR = b.CLASS_NBR. I tried to limit it to emplid from the ps_stdnt_enrl table but... Continue Reading
Views : 38
Sunday 30th of December 2012

Common Query for both oracle and mysql.  

Select Empid Empname From Employee Where Emclass Is Not Null And Empclass ' ' And Empclass '';Above Query Run Well For Mysql.but Not For Oracle Because Oracle Does Not Support Empty String.But I Need Common Query For Both Oracle And Mysql With All The Three Above... Continue Reading
Views : 31
Sunday 30th of December 2012

Help Creating a 2D Table  

Part of my homework requires me to make a couple of 2D tables. I completed one of the tables with no problem, but I am having trouble with the second one.The question I have finished:List hotel name and average room price for each room type for all hotels. Your output... Continue Reading
Views : 66
Sunday 30th of December 2012

Count and Group Query Help!  

I have a report I created and I need to get a Total Count by Plan Code Description for Each State. I do this and get all my data:SELECT mv.R1_State,mv.subscriber_id,mv.plan_code, pm.description,mv.line_of_business,to_char(mv.effective_date,... Continue Reading
Views : 33
Sunday 30th of December 2012

How to make  

how can I reduce the size of ------------- when table is null.I m in sqlplusI typeSelect A,B,C,D,F,G,H from SOMEHERE where B='GOAT1';if A is 10 char longB is 50c is 10d is 30e is 10f is 50if any of those don't have data... Continue Reading
Views : 74
Sunday 30th of December 2012

PL SQL help  

Anyone that could confirm if this is possible would be great,I have a table with the following columnsEMPLOYEEID NUMBER(12,0)PUNCHDTM DATETIMEZONEID NUMBER(12,0)I want to return any results where any employee id that has 2 different... Continue Reading
Views : 36
Sunday 30th of December 2012

PL/SQL Program Units  

This is the first time that I'm completely stumped by a school assignment, but I think something is missing. However I'm unable to find a starting ground. If someone could point me in a good direction or if they have some information on this type of topic. Ive search my book and I can find... Continue Reading
Views : 20
Sunday 30th of December 2012

URGENT HELP :Date Query  

Hi Guys,Can you people help me to write down one query:I have one table with a columntype "timestamp" say xyz is the name of the column.Suppose today is 15th Sept So I want to fetch all those records whose value is between 14th Sept 00:00:00 and 14th Sept... Continue Reading
Views : 28
Sunday 30th of December 2012

Storing list of values which are returned by a select query  

Hi,I have a requirement like getting list of values from one table and inserting them into another table.I have tried with sub querying but didn't worked out because the select query is returning multiple values.Can any one please suggest how to proceed... Continue Reading
Views : 61
Sunday 30th of December 2012

How to display the result from 2 queries  

Hello, first of all thanks for opening this thread and trying to help me, I am trying to display the results from 2 queries, one is suposed to display the count of the employees, per department, who win over the average of the entire company and the other one is suposed to display the count... Continue Reading
Views : 34
Sunday 30th of December 2012

How do I join these tables so I don't get 100+ junk results  

I'm working on problem #6 on this page pgrocer.net/Cis50/assign/quiztwo_F09.htmland frankly I don't know where to begin. Queries I've tried have returned 168 results when I should be getting less than 10. I know I have to join the tables in some way but haven't figured out which... Continue Reading
Views : 17
Sunday 30th of December 2012

SQL Loader: Load single column  

Hi,I am trying to load a single column into a Table. Below is the ctl file:OPTIONS (ERRORS=10000)LOAD DATATRUNCATEINTO TABLE "ECOMM"."CC_ECOMM"TRAILING NULLCOLS(EMAIL_ID)Calling loader:sqlldr silent=ALL... Continue Reading
Views : 39
Sunday 30th of December 2012

Help with a trigger.  

Here are the relevant tables to the triggers I'm having trouble with.create table profile( userID number(10), uname varchar2(64), email varchar2(32), password varchar2(32), date_of_birth date, picture_URL varchar2(128), aboutme... Continue Reading
Views : 22
Sunday 30th of December 2012

Problem coding select in multiple tables  

I am working on the following SQL select and I am having a mental block on how to get it fixed. I have two tables that I need to match on the codes in each table. If there is a just one record in Table1 with the same code as one record in table2 and both the date and name match then dont... Continue Reading
Views : 83
Sunday 30th of December 2012

Issue to get record from database as text file in oracle form  

Hi all,im really new in oracle and want learn something new lesson to me...can i now if i got 10k data,i want to show each data in row as flat file in oracle form..which means i want one row with one display item.please help me... Continue Reading
Views : 92
Sunday 30th of December 2012

Select specific id or first id  

I need to select a specific ID but if it dose not exist then get the first id in the column. I'm not a DBA but i've tried various combos but cant get this to work. Code: Continue Reading
Views : 51
Sunday 30th of December 2012

Implicit Commit while purging.  

Hi , I have written a purge package that would delete records older than 10 years. Since the data is huge, the purging was taking 14 hours plus. To improve performance, I disabled constraints , deleted records and then reanabled them. This was quite quick but the only problem is rollback.... Continue Reading
Views : 24
Sunday 30th of December 2012

Sysdate if statement procedure help  

Hi guys, I'm new here. I'm working on a project and I can't figure out the procedure I will need to use. I've got a sysdate field in my "Calls" table which generates a call date + time, however I need to insert a severity level of the call after a certain amount of time, eg after 1 hour... Continue Reading
Views : 180
Sunday 30th of December 2012

Problem with Parsing Name & Address, please help  

I intend to write procedures/functions in PL/SQL to parse Name field into various fields : Title, FirstName, MiddleName, LastName, Gender E.g: Nguyen Van ANguyen Thi BAfter parsing, the result will be shown as: Continue Reading
Views : 54
Sunday 30th of December 2012

Numbers are rounded off  

Hi, I created a table of Number(20,4) column. I inserted an amount value 999999999999999.5555 but this value is rounded off to 1000000000000000.0000 automatically in Oracle. How to avoid this? I tried for less number of digits and I am getting the exact value. Is there any way to... Continue Reading
Views : 87
Sunday 30th of December 2012

Sql loader skip blank line  

I am running Oracle 9 and using sql loader to import text file into table. Can sql loader skips the record which blank line or carriage return? Do I need to set up with options? Please advise me how. Thanks. Continue Reading
Views : 100
Sunday 30th of December 2012