Sunday, November 30, 2008

datepart של רבעון ושנה:SQL Server

אתם מעוניינים לשרשר מתוך שדה התאריך בעולם שדה זמן חדש שיכלול פורמט של רבעון ושנה:Q1-2008
הנה הפונקצייה ל- SQL Server:

'Q'+convert(varchar, datepart(qq, pubs.dbo.sales.ord_date))+'-'+ convert(varchar, datepart(yyyy, pubs.dbo.sales.ord_date))

Friday, November 28, 2008

ANSI 92 - פרמטר ב-Designer

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

אז מה הוא נותן לנו ? דרך תפריט ה-file-->parameters ,לשונית ה-parameter
נשנה את הפרמטר הראשון ANSI 92 מ- N ל- Y :

כעת נבחין במס' שינויים ביכולות העולם:

1. ניתן לבצע Full Outer Join בין טבלאות :


2. רוב ה- DB's זורקים את ה- Joins לפסוקית ה- Where (טרה לא...)

ANSI 92 מעביר אותם אל פסוקית ה- From:
לפני:

אחרי השינוי ל-ANSI 92 :


המשמעות היא שה- SQL שנוצר כעת עשוי להיות אופטימלי מאחר וה- Joins מתבצעים כבר ברמת ה- From ,כך שכמות הרשומות שהשאילתא צריכה לעבד מצטמצמת כשמגיעים ל- where

(ארקדי ודימה אומרים שתמיד עדיף ככה וכך גםה-execution plan של ה-SQL...)

3.אפשרויות עריכה מתקדמות ב- Join

אפשרות זו קובעת איזה אובייקטים שהמשתתש בוחר בתנאי השאילתא יעברו לפסוקית ה- From,כאשר ניתן לבחור בחלונית זו רק את אותם אובייקטים המבוססים על הטבלאות ב- Join,המשמעות היא שוב שביצועי השאילתא עשויים להיות טובים יותר...


















א.אפשרות ראשונה :
Default behavior / No objects in FROM = אובייקטי התנאי נשארים בפסוקית ה-FROM :

ב.אפשרות שניה :
כל- All objects in FROM= אובייקטי התנאי יועברו ל- FROM :

ג.אפשרות שלישית:

Selected objects in FROM = רק האובייקטים הנבחרים יועברו לפסוקית ה- FROM


בסה"כ הכל ANSI 92 נותן אפשרויות שליטה מתקדמות בייצור ה-SQL הגנרי בעולם ויכול לשפר את כל מבנה העולם.עכשיו מה שנשאר לכם זה רק לדבר עם איגור ה-DBA שיבדוק האם יש באמת שיפור בשאילתות....

Thursday, November 27, 2008

מציאת משתמשים שלא ביצעו Login ל- BOXI באמצעות ה- Query Builder

רוצים לבצע בדק בית ולראות אילו משתמשים לא בצעו Login למע' ה-BOXI ?
באמצעות הרצת הסקריפט הבא ב- Query Builder תוכלו לגלות מי הם:

select top 1000000 si_id, si_name, si_lastlogontime from ci_systemobjects
where si_kind = 'user' and si_lastlogontime is null

Wednesday, November 26, 2008

Xcelsius 2008 SP1 Fixpack 1 יצא לדרך





חבילת התיקון הראשונה ל-Xcelsius יצאה ומכילה בתוכה מספר תיקונים מתבקשים והריהם לפניכם,החשובים מבינהם סומנו באדום:

Tab Set component produces ActionScript Error #1034 and then crashes when user groups Tab Set's canvases in Object Browser. -> resolved

Filter component loses art and is disabled in Preview, when both Radio Button and Play Selector are also on canvas. -> resolved

LiveCycle Data Services connection: Querying for Data Destinations clears spreadsheet bindings for all existing data elements and resets them to null-> resolved

Using QAAWS, Xcelsius report does not show changed data.-> resolved


When a model contains a large number of Live Office connections, Preview produces an Action Script error.-> resolved

Placing an existing group of components into a Container component, and then un-grouping the components renders them unselectable.-> resolved

A SWF file stored on a local machine with a QaaWS connection, will consume a second license when the connection is refreshed.-> resolved

List Box, Label Based Menu, List Builder and Ticker components: In Design Mode, alert icons persist after deleting previously set Alert Values.-> resolved

After session times out, QaaWS connection does NOT pop up BOE login dialog and cannot retrieve data.-> resolved

Components are unable to bind to cells in spreadsheets with an exclamation point in the name of the spreadsheet, for example "Xcelsius!".-> resolved

Alerts: When using the Enable Auto Colors option, in conjunction with enabling alerts using the By Value selection, the color gradient chosen by Xcelsius will vary each time the XLF is opened.-> resolved

After opening an XLF file that uses a Global Font (selected from File>Document Properties) other than the default Verdana font, will selected font will be displayed correctly in Preview mode, but not in Design mode.-> resolved

Performance issues of Flash files produced by Xcelsius 2008.-> various performance improvements (for detail information check Fixed Issues document)

Problem: When retrieving data using QaaWS or Web Service data connections, some selector Labels display "Undefined", "Null" or produce ActionScript error message #1009.-> resolved (for detail information check Fixed Issues document)

Label Based Menu: When component is displayed using Dynamic Visibility, the first Label is missing. -> resolved (for detail information check Fixed Issues document)

Excel 'IF' Function: If the IF function's Logical_test parameter references a blank cell, Xcelsius will calculate the formula incorrectly in Preview mode or at runtime.-> resolved

Map components - Alerts: When the alert threshold values are bound to a range, and the values are dynamically changed, the alerts are not updated.-> resolved

When an MXML component, for example MXML Horizontal Slider sample component provided with the SDK, is added to the canvas, all other components will not update when changes are made to their Properties panel.-> resolved

Selectors - Unable to take square brackets as labels.-> resolved

Label components are editable during runtime, and Labels are selectable using Tab key navigation.-> resolved

Tab Set component: When dragging a component into the Tab Set from the Object Browser, it is possible to place the component inline with the Tab Set's Canvas components, rather than within the Canvas. This causes an ActionScript error.-> resolved

תחביר פונקציית ה-isnumber ,isnull ב- Webi XI

פונקציית ה- isnull מאפשרת להחזיר ערכים של 0/1 עבור שדה שהימצאות/אי הימצאות ערך נבדקת עבורו.

בדרך זו ניתן להיפתר משורות שלא מכילות ערכים ובהמשך להגיע לסינון רשומות עם ערכים בלבד.
אחד המקומות שפונקצייה זו באה לידי ביטוי היא בעת שילוב שאילתות שלא תמיד מציגות רשומות חופפות.
לדוגמא:שאילתא אחת מחזירה לקוח עם הכנסה ושאילתא שנייה לקוח עם סכום הזמנה משוער.
אולם ישנם לקוחות שאין להם סכום הזמנה משוער ולקוחות כאלו שאין להם סכום הכנסה אך יש להם סכום הזמנה משוער.
איך נמצא רק את הלקוחות שיש להם גם הכנסה וגם סכום הזמנה משוער?
ה- isnull ולחילופין ה- isnumber מאפשרים לנו להגיע לתשובה לשאלה:"מהן הרשומות המשותפות ל- 2 השאילתות בלבד?" בקלות,הנה התחביר ל- Webi:

=If (IsNumber([Number of guests]) And IsNumber([Sales revenue]) ; 1

Sunday, November 23, 2008

Universe Designed for Dashboards Metrics

מהם כללי הבניה של עולם שנוצר עבור שעונים (dashboards) ב- BOXI ?
כיצד ניתן ליצור אופיטמיזצייה של הדוחות והשעונים שיופקו על גבי עולם כזה?
קראו הכל כאן:

Prompt:הקלד מס' אותיות וקבל את כל הערכים

במקרים בהם המשתמש זקוק לפרומפט שיאפשר לו להקליד מס ' אותיות ולקבל את כל הערכים הדומים המתחילים בצירוף זה נוכל לבנות Prompt בעולם,לדוגמא:

המשתמש מקליד את האותיות se ומקבל את כל הערכים שמתחילים בצירוף זה
service 1service 2 וכו'...

חשוב לזכור:פונקציית ה- Like המאפשרת את החיפוש והמציאה, מתאימה לשדות מסוג Character
חיפוש בהתחלה:

tablename.culomn_name like @variable('type the first letters') +'%'

חיפוש בסוף:

CUSTOMER.name like '%' + @variable('type the first letters')

count all ב- Webi XI

לכל מי שעדין צועק לשמים היכן נעלמה הפונקצייה הזו ב- Webi XI הנה תחבירה:

count([field];all) .a=
רק בחלונית הנוסחאות ניתן לכתוב אותה...

Saturday, November 22, 2008

בניית שעוני Xcelsius על גבי עולם באמצעות ה- QaaWS

ניתן לבנות ב- Xcelsius שעון או מצגת על גבי רכיב ה- QaaWS :

Query as a Web Service המתחבר ל- Universe ומייצר על גביו שאילתא אותה ניתן כאמור לחבר באופן דינמי לשעון ב- Xcelsius .
כיצד ניתן לבצע זאת? קראו כאן בסיפור לקוח אמיתי שהתרחש ב- CLEVELAND CLINIC:

http://sfarea.org/P18.pdf

General Best Practices in Universe Design

מצ"ב לינק למצגת המתארת בקווים כלליים (יש תמונות!) איך ליצור Universe יעיל,המצגת מתאימה לדייזנרים בתחילת דרכם
וגם למנוסים שהיו רוצים לקרוא בכלליות על יסודות ה-Designer :

http://www.gaboug.org/archive/200809_UniverseBestPractices.ppt