All I wanted to do was to add a column to a pre existing table in the Database and give it a default value.
My SQL was:
ALTER TABLE Table1
ADD Column1 VARCHAR2(1) not null default 'N';
I kept getting this error:
ORA-30649: missing DIRECTORY keyword
Cause: DEFAULT DIRECTORY clause missing or incorrect.
Action: Provide the DEFAULT DIRECTORY.
Well, google did not help. What is a default directory anyway? So I played with my SQL a little bit more and came up with:
ALTER TABLE Table1
ADD Column1 VARCHAR2(1) default 'N' not null;
It was just a sequence problem in the SQL Statement. Im a no SQL Expert and when I look at such Oracle error numbers it does nothing but confuse me.
Wednesday, December 8, 2010
Oracle rownum
'rownum' is an Oracle column that has the sole intension of numbering rows in the result set. There are a lot of blogs and article about it.
I happened to work with it today. I have a view that has a UNION in it. In order for NHibernate to return the correct row I needed to add the rownum. This is what I came up with
create or replace view EMPLOYEE_NAME as
select rownum, fname, lname
from employee
UNION
select rownum, fname, lname
from employee
inner join department on employee.id = department.employee_id;
The result set did not have unique rownum. I was baffled and not sure what went wrong there. Apparently if you have a union between to select statement, they need to clubbed together and the rownum needs to be on the result of the union.
The correct way to do this would be
create or replace view EMPLOYEE_NAME as
I happened to work with it today. I have a view that has a UNION in it. In order for NHibernate to return the correct row I needed to add the rownum. This is what I came up with
create or replace view EMPLOYEE_NAME as
select rownum, fname, lname
from employee
UNION
select rownum, fname, lname
from employee
inner join department on employee.id = department.employee_id;
The result set did not have unique rownum. I was baffled and not sure what went wrong there. Apparently if you have a union between to select statement, they need to clubbed together and the rownum needs to be on the result of the union.
The correct way to do this would be
create or replace view EMPLOYEE_NAME as
select rownum, e* from
(select fname, lname
from employee
UNION
select fname, lname
from employee
inner join department on employee.id = department.employee_id);
Tuesday, June 22, 2010
Barbie and Technology
Over a month ago I was interviewed by "Blair, Ortmann" from the Beaumont Enterprise for an article she was writing about "Computer Engineer Barbie". It came to me as no surprise when I was asked the obvious question "How do I feel about Barbie's new look?" I've never thought there was a limit to what Barbie can do. Like I told Blair, "Computer engineer Barbie 'will motivate a lot of girls, you have see a Barbie nurse, you’ve seen a Barbie bride, let the girls see and think differently. A pink laptop is still a laptop."
I've been working as a software engineer for a software company in Austin TX for almost 3 years now. In that time, I have learned so much about what it means to be a developer. I've loved every moment of working with an enthusiastic, hard working and motivated team. I am the only "girl" developer working in a team of seven. I would not say that every day has been the best because I have had some challenges to face. Initially it was difficult to make the developers take me seriously and to listen to what I had to say. After a lot of learning and adaptation I am respected and heard. There is always comments like "Looks like the entire New York is here" and others. The good thing is that I forget remarks like this fast and that keeps me going. I have successfully been part of four projects, all have been long hours and hard work, but they were all worth it.
Barbie to me is strong and smart. In software development you need similar qualities. I have learnt things like code ownership and pride. It gives me satisfaction just by creating something that will make the life of someone else so easy and systematic. I have a peaceful night sleep knowing I created something. Development is not as glamorous as Barbie is, nor is it all about laptops and hi-tech gadgets. We have nice cubicles where you find spending most of your day. Most of the developers I work with would love to get by wearing a T-Shirt and Jeans. So its not about clothes and how you dress to work either. The only thing that is most appealing is thats it is your code and that it will make a difference in the lives of many.
Unlike nursing, this field is more male dominated. A couple of my friends are into software development. According to techworld.com only 2% women are working on open source projects. Most women try not to participate in such projects because of the comments made by the other male developers. I goto user group meetings like ADNUG and Agile Austin to find myself the only developer in a group of 50 or more most of the times. I wonder if it is the same every where.
I've been working as a software engineer for a software company in Austin TX for almost 3 years now. In that time, I have learned so much about what it means to be a developer. I've loved every moment of working with an enthusiastic, hard working and motivated team. I am the only "girl" developer working in a team of seven. I would not say that every day has been the best because I have had some challenges to face. Initially it was difficult to make the developers take me seriously and to listen to what I had to say. After a lot of learning and adaptation I am respected and heard. There is always comments like "Looks like the entire New York is here" and others. The good thing is that I forget remarks like this fast and that keeps me going. I have successfully been part of four projects, all have been long hours and hard work, but they were all worth it.
Barbie to me is strong and smart. In software development you need similar qualities. I have learnt things like code ownership and pride. It gives me satisfaction just by creating something that will make the life of someone else so easy and systematic. I have a peaceful night sleep knowing I created something. Development is not as glamorous as Barbie is, nor is it all about laptops and hi-tech gadgets. We have nice cubicles where you find spending most of your day. Most of the developers I work with would love to get by wearing a T-Shirt and Jeans. So its not about clothes and how you dress to work either. The only thing that is most appealing is thats it is your code and that it will make a difference in the lives of many.
Unlike nursing, this field is more male dominated. A couple of my friends are into software development. According to techworld.com only 2% women are working on open source projects. Most women try not to participate in such projects because of the comments made by the other male developers. I goto user group meetings like ADNUG and Agile Austin to find myself the only developer in a group of 50 or more most of the times. I wonder if it is the same every where.
Subscribe to:
Posts (Atom)