Home » SQL & PL/SQL » SQL & PL/SQL » A few simple questions
A few simple questions [message #389235] Fri, 27 February 2009 13:52 Go to next message
mustaine85
Messages: 7
Registered: February 2009
Junior Member
Hi, just need a few simple questions answered Smile

1. I'm using textpad/notepad++ to edit some code and make indentation easier, but when I run the code it causes errors because of the tabbed indentation. Anything I can do to stop this other than deleting the spaces myself?

2. When creating a table is there a data type that will store a time value in the format HHMM?

3. I have two fields that hold the length and width of a room, is it possible to make a field at table creation time that will automatically calculate and store the area of these two values into another field when length and width is inserted?

Hope that makes sense and thanks for any answers Smile

Re: A few simple questions [message #389236 is a reply to message #389235] Fri, 27 February 2009 13:59 Go to previous message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>1. I'm using textpad/notepad++ to edit some code and make indentation easier, but when I run the code it causes errors because of the tabbed indentation. Anything I can do to stop this other than deleting the spaces myself?
global find & replace

>2. When creating a table is there a data type that will store a time value in the format HHMM?
The DATE datatype stores both date & time "unformatted".
Format is strictly a data presentation issue; not storage issue.

>3. I have two fields that hold the length and width of a room, is it possible to make a field at table creation time that will automatically calculate and store the area of these two values into another field when length and width is inserted?
This is bad idea.
You should never store computed values (like area) in DB.
Again compute the desired value when data is extracted for reports.

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/

Previous Topic: Insert/Update with cyclic sequence ID (merged 2)
Next Topic: oscmd.sql
Goto Forum:
  


Current Time: Wed Dec 07 22:15:05 CST 2016

Total time taken to generate the page: 0.09855 seconds