By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Using extended properties on the DB objects. What is it?

OraMaster
100+
P: 135
Hi All,

Below is the SQL of one view in my DB.

Expand|Select|Wrap|Line Numbers
  1. SELECT     cxc.cst_key AS q37_individual_key, dbo.co_individual.ind_cst_key AS q37_related_ind_key, dbo.co_individual.ind_prf_code AS q37_prf_code, 
  2.                       dbo.co_individual.ind_first_name AS q37_first_name, dbo.co_individual.ind_last_name AS q37_last_name, 
  3.                       dbo.co_individual.ind_mid_name AS q37_ind_mid_name, dbo.co_individual.ind_sfx_code AS q37_sfx_code, 
  4.                       dbo.co_individual.ind_gender AS q37_gender, dbo.co_individual.ind_deceased_flag AS q37_deceased_flag, 
  5.                       dbo.co_individual_ext.ind_death_date_ext AS q37_death_date_ext, dbo.co_individual_ext.ind_membership_id_ext AS q37_membership_id_ext, 
  6.                       cxc.cxc_rlt_code AS q37_rlt_code, cxc.cxc_start_date AS q37_start_date, cxc.cxc_end_date AS q37_end_date
  7. FROM         (SELECT     cxc_cst_key_1 AS cst_key, cxc_cst_key_2 AS cst_key_2, cxc_rlt_code, cxc_start_date, cxc_end_date
  8.                        FROM          dbo.co_customer_x_customer
  9.                        WHERE      (cxc_rlt_code =
  10.                                                   (SELECT     TOP (1) fws_option_values
  11.                                                     FROM          dbo.fw_system_option
  12.                                                     WHERE      (fws_key = '3ab8d879-5c2d-480e-8bd0-360aaabb9cae'))) AND (cxc_end_date IS NULL OR
  13.                                               cxc_end_date <= GETDATE())
  14.                        UNION ALL
  15.                        SELECT     cxc_cst_key_2 AS cst_key, cxc_cst_key_1 AS cst_key_2, cxc_rlt_code2 AS cxc_rlt_code, cxc_start_date, cxc_end_date
  16.                        FROM         dbo.co_customer_x_customer AS co_customer_x_customer_1
  17.                        WHERE     (cxc_rlt_code =
  18.                                                  (SELECT     TOP (1) fws_option_values
  19.                                                    FROM          dbo.fw_system_option AS fw_system_option_1
  20.                                                    WHERE      (fws_key = '3ab8d879-5c2d-480e-8bd0-360aaabb9cae'))) AND (cxc_end_date IS NULL OR
  21.                                              cxc_end_date <= GETDATE())) AS cxc INNER JOIN
  22.                       dbo.co_individual ON cxc.cst_key_2 = dbo.co_individual.ind_cst_key INNER JOIN
  23.                       dbo.co_individual_ext ON dbo.co_individual.ind_cst_key = dbo.co_individual_ext.ind_cst_key_ext
  24.  
  25. GO
  26. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
  27. Begin DesignProperties = 
  28.    Begin PaneConfigurations = 
  29.       Begin PaneConfiguration = 0
  30.          NumPanes = 4
  31.          Configuration = "(H (1[25] 4[3] 2[56] 3) )"
  32.       End
  33.       Begin PaneConfiguration = 1
  34.          NumPanes = 3
  35.          Configuration = "(H (1 [50] 4 [25] 3))"
  36.       End
  37.       Begin PaneConfiguration = 2
  38.          NumPanes = 3
  39.          Configuration = "(H (1 [50] 2 [25] 3))"
  40.       End
  41.       Begin PaneConfiguration = 3
  42.          NumPanes = 3
  43.          Configuration = "(H (4 [30] 2 [40] 3))"
  44.       End
  45.       Begin PaneConfiguration = 4
  46.          NumPanes = 2
  47.          Configuration = "(H (1 [56] 3))"
  48.       End
  49.       Begin PaneConfiguration = 5
  50.          NumPanes = 2
  51.          Configuration = "(H (2 [66] 3))"
  52.       End
  53.       Begin PaneConfiguration = 6
  54.          NumPanes = 2
  55.          Configuration = "(H (4 [50] 3))"
  56.       End
  57.       Begin PaneConfiguration = 7
  58.          NumPanes = 1
  59.          Configuration = "(V (3))"
  60.       End
  61.       Begin PaneConfiguration = 8
  62.          NumPanes = 3
  63.          Configuration = "(H (1[56] 4[18] 2) )"
  64.       End
  65.       Begin PaneConfiguration = 9
  66.          NumPanes = 2
  67.          Configuration = "(H (1 [75] 4))"
  68.       End
  69.       Begin PaneConfiguration = 10
  70.          NumPanes = 2
  71.          Configuration = "(H (1[66] 2) )"
  72.       End
  73.       Begin PaneConfiguration = 11
  74.          NumPanes = 2
  75.          Configuration = "(H (4 [60] 2))"
  76.       End
  77.       Begin PaneConfiguration = 12
  78.          NumPanes = 1
  79.          Configuration = "(H (1) )"
  80.       End
  81.       Begin PaneConfiguration = 13
  82.          NumPanes = 1
  83.          Configuration = "(V (4))"
  84.       End
  85.       Begin PaneConfiguration = 14
  86.          NumPanes = 1
  87.          Configuration = "(V (2))"
  88.       End
  89.       ActivePaneConfig = 0
  90.    End
  91.    Begin DiagramPane = 
  92.       Begin Origin = 
  93.          Top = 0
  94.          Left = 0
  95.       End
  96.       Begin Tables = 
  97.          Begin Table = "co_individual"
  98.             Begin Extent = 
  99.                Top = 6
  100.                Left = 230
  101.                Bottom = 121
  102.                Right = 441
  103.             End
  104.             DisplayFlags = 280
  105.             TopColumn = 0
  106.          End
  107.          Begin Table = "co_individual_ext"
  108.             Begin Extent = 
  109.                Top = 6
  110.                Left = 479
  111.                Bottom = 121
  112.                Right = 758
  113.             End
  114.             DisplayFlags = 280
  115.             TopColumn = 0
  116.          End
  117.          Begin Table = "cxc"
  118.             Begin Extent = 
  119.                Top = 6
  120.                Left = 38
  121.                Bottom = 121
  122.                Right = 192
  123.             End
  124.             DisplayFlags = 280
  125.             TopColumn = 0
  126.          End
  127.       End
  128.    End
  129.    Begin SQLPane = 
  130.    End
  131.    Begin DataPane = 
  132.       Begin ParameterDefaults = ""
  133.       End
  134.    End
  135.    Begin CriteriaPane = 
  136.       Begin ColumnWidths = 11
  137.          Column = 1440
  138.          Alias = 900
  139.          Table = 1170
  140.          Output = 720
  141.          Append = 1400
  142.          NewValue = 1170
  143.          SortType = 1350
  144.          SortOrder = 1410
  145.          GroupBy = 1350
  146.          Filter = 1350
  147.          Or = 1350
  148.          Or = 1350
  149.          Or = 1350
  150.       End
  151.    End
  152. End
  153. ' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'VIEW', @level1name=N'vw_client_ri_individual_spouses'
  154.  
  155. GO
  156. EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'VIEW', @level1name=N'vw_client_ri_individual_spouse'
Can anyone pls explain me the code below of create view SQL. I am not getting why and how these extended properties are neing used in this code.
Oct 12 '09 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
It's very hard to answer your question without knowing what this query is for, what kind of application it is designed for, why is it needed to be created, etc...

But you may start from learning what is extended property here.

Good luck!!!

--- CK
Oct 14 '09 #2

OraMaster
100+
P: 135
@ck9663
Hi

Thanks for your reply.
Oct 15 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.