using general expression when creating check constraint in pl/sql
CONSTRAINT "CUSTOMER_CK_PHONE" CHECK (REGEXP_LIKE ( phone, '^([0-9]*?\ ?\/?[0-9]{4}[0-9]{4})$ ' ) ) ENABLE
Achievement provides the only real pleasure in life
CONSTRAINT "CUSTOMER_CK_PHONE" CHECK (REGEXP_LIKE ( phone, '^([0-9]*?\ ?\/?[0-9]{4}[0-9]{4})$ ' ) ) ENABLE
Posted by
SF
at
10:09 pm
0
comments
symptom:
I installed 10g ex a while ago, now try to login, but forgot what the password was for the default username "system", can any one please help to retrieve the password?
fix:
SQL> conn / as sysdba
Connected.
SQL> alter user system identified by
Posted by
SF
at
11:28 pm
0
comments
for the header row, do this:
DBMS_OUTPUT.PUT_LINE(rpad(‘ID’,5) || rpad(‘LAST_NAME’, 15) || rpad(‘FIRST_NAME’,15) || lpad(‘ANNUAL_SALARY’,11) || lpad(‘TAX’,11) || lpad(‘COMMISSION_PCT’, 16));
DBMS_OUTPUT.PUT_LINE(rpad(‘____ ’,5) || rpad(‘_______________’, 15) || rpad(‘_______________’,15) || lpad(‘___________’,11) || lpad(‘___________’,11) || lpad(‘______________’, 16));
then in the loop I did:
DBMS_OUTPUT.PUT_LINE(rpad(r_emp.id,5) || rpad(r_emp.last_name, 15) || rpad(r_emp.first_name,15) || lpad(v_an_sal,11) || lpad(v_tax,11) || lpad(v_com_pct, 16));
not very enjoyable way of formating, but it worked......
Posted by
SF
at
9:10 pm
0
comments
select * from user_indexes
where table_owner like 'xxxxxx' and table_name like 'ABC';
Posted by
SF
at
8:29 pm
0
comments
found this tool that makes it easier to upload sql database to the host environment
http://www.codeplex.com/sqlhost
Posted by
SF
at
4:58 pm
0
comments
select TABLE_NAME, CONSTRAINT_NAME, STATUS
from USER_CONSTRAINTS
where TABLE_NAME like 'INVOICE';
the word after 'like' must be in capital, otherwise you won't get any result
Posted by
SF
at
10:39 pm
0
comments
create a homepage skin with the LogoPane instead of the Logo skin token
all other pages will use a skin that has standard Logo skin token
Posted by
SF
at
10:19 pm
0
comments
the background color of my site is mainly dark-red and black, the text is in white color. When i click on a link to open another page, the background always flash in yellow color and return back to normal. what happened?
answer:
there is a background color set to be yellow in the css, check it
Posted by
SF
at
10:16 pm
0
comments
update DNN site from version 3.1 to 3.3.7, now when i open the site in IE7, the version number is displayed together with the page title on the IE7 tab:
My Site > Home (DNN 3.3.7)
in order to get rid of the stuff in '()', Log in as superuser ("host"), go to host settings in host menu and uncheck "show copyright credits".
Posted by
SF
at
10:14 pm
0
comments
Only the text with quotes is case sensitive.
Posted by
SF
at
10:10 am
0
comments
CREATE TABLE student(
student_no NUMBER(3) NOT NULL,
age NUMBER(2) CHECK(age>18),
gender CHAR(1) CHECK(gender='m' or gender='f') NOT NULL
);
Posted by
SF
at
10:26 am
0
comments
SELECT * FROM tab;
Posted by
SF
at
2:42 pm
0
comments
select column_name from information_schema.columns where table_name ='authors'
Posted by
SF
at
2:42 pm
0
comments
select * from sysobjects where type = 'U' and uid=user_id('dbo')
Posted by
SF
at
2:22 pm
0
comments
SELECT * FROM tab;
Posted by
SF
at
11:39 pm
0
comments
< asp:Button runat="server" ID="GoButton" Text="Go" CommandName="Select" Visible='<%# ((System.Data.DataRowView)Container.DataItem)["ABC"] != DBNull.Value %/>' />
Posted by
SF
at
9:59 am
0
comments
if you want to do assign a NULL value to a integer type column, u will get error, I had to try to give a -1 value to work around, is there a better/real solution?
Posted by
SF
at
3:42 pm
0
comments
tried to format date boundfield to {0:dd/MM/YYYY}, it won't work, in order to solve the problem, you need to set the "HtmlEncode" of the column to "false"
Posted by
SF
at
3:54 pm
0
comments