• Link to X
  • Link to LinkedIn
  • Link to Facebook
  • עברית עברית עברית he
  • English English אנגלית en
Real Time DBA Magic
  • בית
  • Oracle
    • Data Guard
    • Performance
  • Big Data
    • Hadoop
  • אודות
    • מי אני
    • צור קשר
    • בלוג
    • Oracle ACE Program
  • Click to open the search input field Click to open the search input field חיפוש באתר
  • Menu Menu

ארכיון עבור תגית: with

הנך כאן: עמוד הבית1 / with

פוסטים

פיצ'ר חדש: הרצת קוד PL/SQL המקושר לשליפה

25 במאי 2014/1 תגובה/ב- Oracle/מאת זהר אלקיים/זמן קריאה משוער: 3 דקות

לאחרונה נתקלתי בפיצ'ר חדש בגרסה 12 שעושה לי את החיים לקלים במיוחד בכל מה שקשור לכתיבת קוד המיוחד לשליפה ספציפית. הסיפור היה כזה: עבדתי בסביבה של לקוח ורציתי ליצור פונקציה שתעשה חישוב מותנה על עמודות מסוימות בטבלה. הרעיון היה לנתח את התוכן של כל עמודה ולהחזיר תוצאה. את רוב הדברים אפשר לעשות מתוך קוד ה- SQL אבל לפעמים יותר נוח לכתוב דברים בשפה פרוצדורלית, בטח אם הקוד חוזר על עצמו שוב ושוב.

עד גרסה 12, הפתרון היה פשוט – הולכים על פונקציית PL/SQL: כותבים פונקציה, שומרים אותה בבסיס הנתונים ואז משתמשים בה.

נשאלת השאלה, מה עושים כאשר מדובר בפתרון מאוד ספציפי לבעיה מאוד ספציפית שלא רוצים או לא צריך לשמור לשימוש עתידי? מה עושים אם אנחנו לא רוצים להשאיר את הפונקציה זמינה לשימוש של אנשים אחרים? איך נמנעים מיצירת מבחר פונקציות לא שימושיות שכאלה בבסיס הנתונים שסתם מזבלות את הסביבה?
המשך קריאה… →

https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 זהר אלקיים https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png זהר אלקיים2014-05-25 10:07:522014-11-02 11:08:32פיצ'ר חדש: הרצת קוד PL/SQL המקושר לשליפה

שימוש ב-with כדי לפשט שליפות

16 בנובמבר 2010/2 תגובות/ב- Oracle, סקריפט, שליפות/מאת זהר אלקיים/זמן קריאה משוער: 2 דקות

לא הרבה יודעים, אבל התחביר של שליפות באורקל הוא דבר דינמי ומשתנה בין גרסאות. דוגמה טובה ומעניינית  היא שהחל מגרסה 9.2 אורקל הוסיפו את התאימות למה שהוגדר בתקן של SQL99 והדבר הביא להוספה של הפונקציונליות של תנאי with כאשר עושים select – דבר שיכול לעזור לנו מאוד בפישוט שאילתות.

נתחיל בשיעור היסטוריה קצר כדי להבין מה זה בעצם אומר. כידוע, SQL היא לא שפה ייחודית לאורקל – זו שפה עם סטנדרטים שנקבעים על ידי ANSI. הגרסה הראשונה של השפה שעברה סטנדרטיזציה הייתה בשנת 1986 עם הוצאת SQL86.  בשנת 92 יצאה גרסה נוספת (SQL92) שהייתה גם הגרסה הראשונה שאורקל ניסתה להתאים את עצמה אליה בגרסת Oracle 8. בשנת 1999 יצאה גרסה חדשה ומורחבת של השפה (SQL99) שכללה הרבה מהתכונות שהיו באורקל לפני זה (triggers, recursive sql ועוד) ואורקל התאימו את עצמם שוב למרבית התקנים החדשים בגרסה Oracle 9i (אם אני לא טועה זה היה בגרסה 9.2).

המשך קריאה… →

https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 זהר אלקיים https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png זהר אלקיים2010-11-16 18:06:572014-11-27 20:42:09שימוש ב-with כדי לפשט שליפות
  • עברית
    • English (אנגלית)
דירוג
  • שימוש ב-Append ו-redo logs5 באפריל 2011 - 23:06
  • יצירת קובץ CSV על ידי שימוש ב-SQLPLUS...18 בנובמבר 2010 - 17:45
  • כמה מילים על bind peeking ואיך למחוק Execution Plan מה-...21 במרץ 2012 - 18:25
  • עולם ה- Big Data ופתרון ה- Hadoop – מאמר מתוך Oracle New...6 ביוני 2012 - 9:00
פוסטים אחרונים
  • לאלה שתוהים למה הבלוג לא מתעדכן בעברית...23 במאי 2016 - 22:38
  • ההשפעה של no logging על data guard3 בספטמבר 2015 - 10:45
  • תהליך ה-startup של אורקל (מדריך למתחילים)...18 במאי 2015 - 9:57
  • PRVF-0002 : Could not retrieve local nodename10 במאי 2015 - 15:39
תגובות
  • rotemadפוסט מעולה! אני יודע שזה פוסט ישן, אבל בכל זאת אני רק אוסיף ...24 במאי 2016 - 12:23 מאת rotemad
  • […] דוגמה אחרת היא הדוגמה הזו. […]...15 במרץ 2016 - 22:36 מאת Oracle Database Firewall - Real DBA Magic
  • […] not as a participant) was in 2011. I gave to session...16 בנובמבר 2015 - 10:27 מאת Oracle Database Advanced Querying Presentation
  • […] first time I took place (as a trainer, not as...16 בנובמבר 2015 - 10:22 מאת Oracle Database Advanced Querying Presentation
תגיות
#oow13 12c 12cR1 awr Big data BigData csv Database data guard data guard broker Data warehouse DB12c DBIM expdp guide Hadoop howto iloug Linux Microsoft SQL Server New Features NoSQL opatch oracle Oracle 11g Oracle 12c oracle 12c new features Oracle Database Oracle Data Guard ORACLE DATAGUARD performance PL/SQL RAC redo log rman script SQL sqluldr startup vldb webinar with אורקל האדופ שבוע אורקל
© Copyright - Zohar Elkayam, Real DBA Magic, 2010-2017
  • Link to X
  • Link to LinkedIn
  • Link to Facebook
  • בית
  • Oracle
  • Big Data
  • אודות
Scroll to top Scroll to top Scroll to top
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}