sasa87 بتاريخ: 6 يوليو 2008 تقديم بلاغ مشاركة بتاريخ: 6 يوليو 2008 السلام عليكم انا عندي كام سوال وارجو الاجابة عليهم:1- ما هو الفرق بين RR fromat and YY fromat ارجو التوضيع مع مثال لها.2- مالمقصود بــ function based index ارجواااااااا التوضيع ايضا مع مثلا.3- مالفائده من استخدام lpad and rpad4- يوجد داخل DLL امر اسمه comment مافائدة هذا امر.5- يوجد داخل DML امر اسمه merge مافائدته ايضا.اعذروني على الاسئله بس انا لسه مخلص اول جزء في SQL وهذاي بعض الاشياء التي لم استطع فهمها ارجو من الجميع المساعده ولا تبخلو علينا اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
t-hassaan بتاريخ: 7 يوليو 2008 تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 الاخ الكريم تلك بعض الاجابات ارجوا ان تكون مفيدة وسوف اقوم الاجابة عن الاسئلة الباقية لاحقا ان شاء الله 3 –استخدام LPAD , RPAD LPAD(x, width [, pad_string])تسخدم لملء المسافات الموجودة يمين rpad او يسار lpad رقم معين X بتكرار حرف pad_string حتى طول معين ممكن استخدامها فى طباعة المبالغ الماليةselect lpad ( 100,10,'*') , rpad (100,10,'*' ) from dual ;LPAD(100,10,'*') RPAD(100,10,'*') *******100 100******* 4 –امر comment لاضافة ملاحظة على الجدول او العمود وتظهر فى حالة استعراض Data Dictionary Ex :COMMENT ON TABLE employees IS 'An example of comment statement ';select * from USER_TAB_COMMENTS; اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
sasa87 بتاريخ: 7 يوليو 2008 كاتب الموضوع تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 الف شكر انك رضيت على الموضوع بتاعي وانا مستني باقي الاجابات سلااااااااااااااام اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
t-hassaan بتاريخ: 7 يوليو 2008 تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 لا شكر على واجبهذا الاقتباس من ORACLE Materials SQL Fundamental II The MERGE Statement Provides the ability to conditionally update or insert data into a database tablePerforms an UPDATE if the row exists, and an INSERT if it is a new row:Avoids separate updatesIncreases performance and ease of useIs useful in data warehousing applications MERGE INTO table_name table_alias USING (table|view|sub_query) alias ON (join condition) WHEN MATCHED THEN UPDATE SET col1 = col_val1, col2 = col2_val WHEN NOT MATCHED THEN INSERT (column_list) VALUES (column_values); اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Om MAriam بتاريخ: 7 يوليو 2008 تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 This document comes from Metalink:What is the difference between the YY and RR format masks?The RR format mask was introduced to deal with end-of-century issues for 2-digit format masks. A problem arises when using a 2-digit year. "12" could mean "2012" or it could mean "1912" for example. The YY format mask always assumes that the 2 digits are the year in the "current" century. So "12" with a format mask of "YY" now means "2012" but if the same application ran in 1998 the same input would have been read as "1912".The "RR" format mask shifts this cut-of point by 50 years. Obviously you can still only define a period of 100 years with a 2 digit number so there is no fool-proof case. When using the "RR" format mask every value 00 to 49 means this same century as long as we're currently before year 50 as well, if we're currently after year 50 a value of 00 to 49 is read as a year in the next century. The same is true the other way around. If we're currently before year 50 then a value of 50 to 99 is read as the previous century and a value of 00 to 49 is read as the current century. So the four cases are like this:in 1998 a value of "05" (with format mask "RR") means 2005 in 1998 a value of "95" (with format mask "RR") means 1995 in 2003 a value of "05" (with format mask "RR") means 2005 in 2003 a value of "95" (with format mask "RR") means 1995 So by using this format mask there are no problems when the century changes, however when RR is used as a format mask new problems will arise when the year 2050 comes closer so by then the format mask YY will have to be used again. As a consequence we advise to always use a 4-digit year to resolve these problems completely (or at least for the next 8000 years).What is the difference between the YYYY and RRRR format masks?When the RR format mask was introduced (see above), RRRR also became a valid format mask.However, when a 4-digit year is used there can be no question what you mean. 2003 is always the year 2003, 1996 is always the year 1996. Therefore the format masks YYYY and RRRR are exactly the same. اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Om MAriam بتاريخ: 7 يوليو 2008 تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 يوجد داخل DLL امر اسمه comment مافائدة هذا امر؟Comment :لاضافة ملاحظات على الجدول او العمود كتعريف اسم الجدول او العمود بالعربي او اى ملحوظة تحطها مثلاً:comment on table TAB_USERS is 'مستخدمين النظام';# الجملة السابقة توضح اسم بالجدول و منه يمكن تحديد فائدتهcomment on column TAB_USERS.SEC_FLAG is 'درجة الصلاحية:1=NORMAL,2=HIGH';# يبين فائدة العمود وهو يوضح درجة صلاحية المستخدم 1: صلاحية عادية 2: صلاحية سريةوالComment بيقيد عند عمل الديزاين فى الشاشة وكمان بيفيد معرفة معلومات اضافيةعن الSchemaملحوظة: الCOMMENT ممكن يكون عربي او انجليزي اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Ahmed Zain بتاريخ: 7 يوليو 2008 تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 السلام عليكم ورحمة الله وبركاته اخي فاللهبعد التحيةاخي فالله مثال توضيحي بسيط SELECT TO_DATE(80,'RR'),TO_DATE(80,'YY') FROM DUAL; الناتج TO_DATE(80,'RR'),TO_DATE(80,'YY') ---------------- ---------------- 01/07/1980,01/07/2080 يتضح من المثال السابق ان RR اذكي بحيث انها رجعت الى 1980 ولكن YY راحت الى 2080 اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
t-hassaan بتاريخ: 7 يوليو 2008 تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 الاخ احمدالكود لا يعملدائما يعطى 01-JUL-80 اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
sasa87 بتاريخ: 7 يوليو 2008 كاتب الموضوع تقديم بلاغ مشاركة بتاريخ: 7 يوليو 2008 اخ احمد الكود عيطني نفس ناتج كما قال الاخ السابق هذا هة الناتج : SELECT TO_DATE(80,'RR'),TO_DATE(80,'YY') FROM DUAL; TO_DATE( TO_DATE(-------- --------01/07/80 01/07/80 اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.