User Profile

Collapse

Profile Sidebar

Collapse
rushdishams
rushdishams
Last Activity: Apr 24 '07, 05:34 PM
Joined: Mar 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • rushdishams
    replied to Do we have GOTO statement in Oracle 9i
    yes, you can use GOTO in oracle 9i.
    See more | Go to post

    Leave a comment:


  • No mate, there is no way of doing this as the basic or RDBMS is- "the order of column is of no importance." however, you can only create a new table by dropping the current table according to order of columns of your demand.

    Cheers!
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to To retrive data in two tables
    well, you don't need to have same primary key for 2 tables to get all the data. you need at least one common field/ column to retrieve all data (of course that are relevant) and the field/ column must be in the same domain and data type.

    maybe i am mistaking on your post... it was not vivid that much...sorry if that does not help you...
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Required Query help
    may i know some of the details of your tables like the columns of those 2 tables?
    See more | Go to post

    Leave a comment:


  • you can use comparisons on date fields in a table like <,>,<=, >= and <>.

    as you are working with timestamps, you have to compare them as well.
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Prevent update to column in a table
    you can apply column privileges on that table. if you want a single column not to be modified, then you can set privileges all other columns except that particular column.

    cheers!
    See more | Go to post

    Leave a comment:


  • If you please double click on the field you want to disable, the property pallet appears. then on functional category, you will be able to find out enable property. just turn it to NO. you are done!

    Cheers mate!
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Help needed in SQL query
    dear mate, it is fair to show some of what you have done and what you have got so that you are needing help... with no offence, else it just looks like many of us are doing your homeworks where you are not putting effort at all. ok?

    Code:
    SELECT DISTINCT(p.model), p.speed, p.ram 
    FROM pc p, pc q 
    WHERE p.speed=q.speed AND p.ram=q.ram AND p.model!=q.model
    ORDER BY p.model;
    hope that helps...
    See more | Go to post

    Leave a comment:


  • Hope this works for you-
    Code:
    SELECT deptno, (sal/(SELECT SUM(sal) FROM emp))*100 AS percentage
    FROM emp 
    GROUP BY deptno,sal;
    Cheers!...
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to SQL Trigger
    No, if the two columns are in two different tables, it won't be any problem. but be sure that you have a common field in that two tables if you need to filter your findings (of course, from your business objective, it seems you will have to filter your answers from the two tables).

    Cheers!
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Regarding insertion of records
    just clarifying the previous answer-

    if you have table called name with fields firstname, surname then if you just make the following querie-

    Code:
    INSERT INTO name (firstname, surname) values ('Rushdi', 'Shams');
    it will give you the same functionality as the following one-


    Code:
    INSERT INTO name (surname, firstname) values ('Shams, 'Rushdi');
    ...
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Building a View (basic SQL ?)
    if this is the desired output by you from the query over the view, then the view is as follows.
    Code:
    CREATE VIEW myview AS
    SELECT a.id, a.value, b.value FROM data a, data b 
    WHERE a.name_id=9 AND a.id=b.id AND a.prefix!=b.prefix;
    i made the tables as follows.
    Code:
    CREATE TABLE name(
    	id	integer,
    	name	varchar(20)
    );
    
    CREATE TABLE data(
    	prefix	varchar(1),
    	id
    ...
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Concept about NULL and UNIQUE
    dear suyash, i am confirmed by my mysql developer buddies that mysql also supports 2 null values in UNIQUE column.

    it is what i read in an article couple of days ago-

    though theory says that you cannot have 2 different values in the column which is UNIQUE, even not NULLs. but many database engines breached this in case of NULLs because of introducing more practicality in nature.

    say, you declared- course_name...
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Building a View (basic SQL ?)
    mate, why dont you make more tables? because with those 2 tables, it is really getting complecated to make such query....

    you can make a table to categorize items like book, car, boat and their ids

    you can then make a table which has only book entries

    then a table that has only car entries

    and a table that has only boat entries

    you can then join tables to make such queries....
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Oracle date formatting problem
    or you can try to change the whole date format of oracle ( not that wise decision according to me though) by following command-

    ALTER SESSION SET NLS_DATE_FORMAT ='<my_format>';

    cheers mate!
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Please help me to figure out my error.
    that i don't know. you can post that question as MySQL thread
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Oracle date formatting problem
    one thing you may opt to do is keeping the column in tact but query it in your desired way so that it gives you your desired format. then you can utilize that query for other purposes.

    you can use TO_CHAR (datecolumn, 'desireddatefor mat)'. for instance, as you said your column period has the format mm/dd/yy and say you want to change it to yyyy/mm/dd then you can have it as-

    SELECT TO_CHAR (column, 'YYYY/MM/DD')
    ...
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to cursor
    Also, by using triggers, you can fetch a single row at a time. if you have a trigger on some field and more than one row at a time is fetched as a result of your query on that field, then obviously you are having an ERROR message. cursors are good way providing you the facility to fetch and display rows fetched more than one at a time.

    Cheers
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Building a View (basic SQL ?)
    CREATE VIEW myview AS
    SELECT Data.id, Name.name, Data.value
    FROM Data, Name
    WHERE Data.name_id=Na me.id;

    next time please try to post with "what you have done so far and what is causing you problem" because it seems you are doing just your homework assignment here by depending upon others. i am not offending you, but you should provide what you have done so far and what is causing you problem.
    ...
    See more | Go to post

    Leave a comment:


  • rushdishams
    replied to Oracle 10g Sequence Help please?
    mate, don't know what really happened. because when i tested that in my way, the thing worked as it is meant to be. i am attaching here what i have done so that you can get some sort of help...

    create sequence referee_seq start with 1 increment by 1;

    create table testing(
    id integer,
    name varchar(10),
    primary key(id)
    );

    insert into testing(id,name ) values(referee_ seq.nextval,'A' );...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...