Guest User

Untitled

a guest
Jun 24th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 10.90 KB | None | 0 0
  1. USE [gatradeforms_dev]
  2. GO
  3. /****** Object:  StoredProcedure [dbo].[usp_userQuestions_R]    Script Date: 02/15/2012 19:00:58 ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. ALTER PROCEDURE [dbo].[usp_userQuestions_R]
  9. AS
  10. SET NOCOUNT ON
  11. SELECT UserId, UserName,
  12. [12E574D0-A991-4C9C-83BC-944D1FEF8041] as [First Name],
  13. [B56192FB-9337-47B9-8FD6-8016F9E6AF7D] as [Last Name],
  14. [1634D0FB-CB3F-441E-A5CE-6F71D80B5DCD] as [Username],
  15. [CC23F214-2863-43BE-B72F-E746D914D454] as [Display Name],
  16. [4AF367F4-F846-404A-A203-B6564D50B1F7] as [Email Address],
  17. [FCA3EB39-4920-42CA-B6F9-56427AE21BD0] as [Company Name],
  18. [926156B4-B950-466F-A865-D3B1F63069F6] as [Business Address],
  19. [B410C684-7819-4E45-B6CE-B76B20A61FEF] as [City],
  20. [F721444F-0160-4E48-9585-6DE0FCBA6400] as [State],
  21. [7623DEBB-0788-4989-A3EB-0F203052DD81] as [Zip Code],
  22. [C0A98210-D757-4696-B7CB-31E9A3B556AE] as [Georgia County],
  23. [CA61B664-3507-4C03-B08A-49B91AEF3470] as [Website address:],
  24. [7396CE9B-B06C-4E5E-B7F0-A69D32511A69] as [Name of Company International Trade Contact in charge of international sales & marketing],
  25. [7436255B-EE92-4007-9E7F-40F78E72DA45] as [Title],
  26. [AB436ED0-63E6-4905-A14C-9E8309B279B4] as [Work Phone],
  27. [A9956F51-ADA3-4C8F-B9EE-DF358A1D0E11] as [Cell Phone],
  28. [53519089-0DE4-402D-B85E-05DA7C732CC1] as [Indicate which type(s) of operations you have in Georgia],
  29. [F045A7CD-03D1-41E9-9345-A0C870AC5C9F] as [Other (specify)],
  30. [81E94993-6780-4504-90D8-60616C6D66DF] as [Year Established],
  31. [1AE05E65-DD74-4AC5-B94A-14BF7133CA42] as [If you can provide this information, 2010 Total Revenues],
  32. [AD02A029-4A93-4D6C-9A06-6F201E5211BA] as [If you can provide this information, Year-to-Date Total Revenues],
  33. [3B0088B2-5075-42D2-A499-7EB20C36FFE0] as [What percentage of your annual sales stems from exports?],
  34. [84499356-963F-4540-81BE-B08C357E9A56] as [Based on U.S. operations, did your company operate profitably in its most recently-completed fiscal year?],
  35. [0774AD48-CDC0-428C-B468-CBF3AD8AC3F3] as [What percentage of your annual budget is allocated to exporting?],
  36. [D0CC131B-613F-457D-B420-A76AED59156D] as [Total number of employees in Georgia],
  37. [5FFB72B6-0135-4DC6-8A0D-D5339C77DBFA] as [Number of employees (or full-time equivalents) dedicated to exporting],
  38. [03FA241B-48F7-48BA-8D90-D0FA0412501D] as [If you do not have full-time, dedicated export staff, what percentage of your and/or your employees’ time is dedicated to export],
  39. [18F47D36-998E-4DC1-8C10-3F62CB55B885] as [What specific export training or skills do you or your staff have?],
  40. [7C181503-707F-40CB-9ED2-414F0F83A9E1] as [Does your staff have foreign language capabilities?],
  41. [4395C611-C979-4F9D-97DA-24B4875B4268] as [If so, in which languages?],
  42. [FDA38B11-53C5-45E4-975B-EE07611360C7] as [Are your website and/or marketing materials available in foreign languages?],
  43. [0A3E04D1-C5FF-44E5-A28B-92B87CE2794B] as [If so, in which languages?],
  44. [3F003C94-3A0B-4254-AF0D-4234AD2563F6] as [Do you qualify as a small business under SBA guidelines?],
  45. [5B926A76-1600-4FB9-BADF-02F316A3F7C5] as [Is your company in good standing in the State of Georgia?],
  46. [2F5D19AB-AB95-4BAD-A305-D2B8FA4A5698] as [Do you have an active business license?],
  47. [0D1C41B1-CED2-46F4-8C53-A506435FDAE7] as [Does your company owe any local, state or federal back taxes?],
  48. [34E015BF-13E7-43BB-B547-196045E1AF5A] as [If YES, please explain],
  49. [99EC561A-E9B1-48F6-9E15-A349E657E097] as [Are your U.S. operations currently operating profitably?],
  50. [3A0E0CE7-8F1B-4340-9C3E-CA8A30FC3472] as [If NO, please explain],
  51. [4BEF1241-19C9-4FC2-95DD-F4657942620D] as [Have you previously exported?],
  52. [24575112-C4E6-403A-A841-EF552E394E6C] as [If "yes", how long have you been exporting?],
  53. [335F012C-12CA-4469-863E-59EB412ACA67] as [If "yes", what percentage of your sales is exported?],
  54. [90B4B3D3-02C4-483A-9C3B-FF35B8443CE8] as [If "yes", to which countries do you currently export?],
  55. [95739B69-A6DB-47A0-A5EC-350766B4DC6E] as [Ifno”: Documentation must be attached to this Application to demonstrate and support Applicant’s understanding of the costs as],
  56. [AA8DA6E6-7889-4FC3-9525-2BED4B51F5C3] as [Do you have in effect a strategic plan for exporting?],
  57. [F2D8EDF1-47E7-456F-93E6-DE067939219B] as [If no, please explain why you decided to export and how you have chosen: which products/services to be exported, your export pri],
  58. [1BD5212E-9E61-49E4-A373-3A88B64404C1] as [What are your target export markets for the next 6-18 months?],
  59. [4BE1C64B-3026-4413-86B1-299CB6E82C30] as [Please indicate if you are currently working, or have worked in the past, with any of the following agencies or organizations wi],
  60. [1652BEBD-A5FE-47F3-816A-ABD4DD2D858C] as [New Registration Field],
  61. [866FC525-7A7A-4D08-8348-EFA381CB3BFC] as [Company and product overview (50 word max)],
  62. [97D0E38B-9AD4-44B8-BF30-AC9856534DB8] as [Which products or product lines have you been most successful, or are the most interested, in exporting and why?],
  63. [CD91B517-868C-459C-9603-23E0F93D13E5] as [What are the main competitive advantages of these products or product lines?],
  64. [AF8322F8-F269-4DD3-9521-0D18EA7F0C14] as [Who are your three top U.S. and international competitors?],
  65. [EDFA8022-2258-4CB3-B959-05B89157C56D] as [What are the major industries that use your products/services?],
  66. [2BB52A96-9E5B-4135-955E-0B991A44D3B8] as [If known, what are the Schedule B (Harmonized Schedule) Number(s) for your product(s) to be exported?],
  67. [AD871E7D-93A3-4FD8-A219-3CAE030908C1] as [If known, what are the NAICS Codes for your products or services to be exported?],
  68. [0D48F917-CEAD-48A8-BC59-886B0B5B6EC0] as [If applicable, list the certification(s) that your company currently has including, but not limited to ISO Certification, CE Mar],
  69. [32F2A7FF-8A9E-40D4-9467-D77D708B193E] as [Please attach copies of any DBE or WBE certifications],
  70. [7CD79DDF-3F61-430C-8F5E-ADA1E40C994A] as [In which Program activities would you like to participate? (check all that apply)],
  71. [2308B735-AA11-4490-B370-D3DB02B43E40] as [Name of trade show/trade mission],
  72. [EEA71CE7-AC8E-452E-BDAA-324F6A8C9EDF] as [Date and Place of trade show/trade mission],
  73. [A251E4B7-92B5-4454-BBF9-0AD3C77A73F1] as [Meet with incoming foreign buyers’ delegation(s)],
  74. [CA31AF19-0F7D-456B-9191-B0D38D5F063C] as [Date and Place (foreign buyers’ delegation)],
  75. [22EE1290-806E-47BC-840C-AABC8339A1A8] as [Participate in meeting(s) with international experts],
  76. [020110E7-0C2E-4560-9094-88892B54995F] as [Date and Place (international experts)],
  77. [841B58F7-2AED-4C68-83B1-CD3BF5895CE6] as [Gold Key Service (U.S. Commercial Service) or similar service],
  78. [3BE50041-AD5A-4CF7-95DC-8E5A3B10700B] as [Name of country (Gold Key Service)],
  79. [C070CDFC-C00A-416C-AA4F-ECAB76139E90] as [International Partner Search service (U.S. Commercial Service) or similar service],
  80. [7DFFC1EC-C4FD-4B1C-A361-E3EE0E41B14C] as [Name of country (International Partner Search)],
  81. [61A9AB05-7999-4424-B70B-793B42F9CE1D] as [China Initiative],
  82. [2DFE98C6-1037-477C-A6A7-B9CB18DD3C9A] as [Export Research],
  83. [D2D4295D-918B-4240-A2BD-620F745F3B23] as [Other],
  84. [BC5D2218-4870-43E9-9CB0-791DB9539A1C] as [Other (describe)],
  85. [BCEED6AC-F9EB-425C-B19D-08CC1883DF96] as [<p style="line-height: 14pt;">&nbsp;</p>  <p style="line-height: 14pt;">For the above ],
  86. [2C6F7411-39BF-465E-8873-185377F91583] as [Signature Applicant Representative (digital)],
  87. [2FC4063C-E5BE-4AAB-96E5-1CE8217DE5B6] as [Printed Name],
  88. [D9C05632-6128-40AD-9255-4E0ABEB0FE69] as [Title],
  89. [23168323-56E6-423C-B9DD-5F4004F5E8ED] as [Date]
  90. FROM
  91. (select uu.UserName, drqr.UserID, DynamicQuestionID, COALESCE(Response,'---') as [Response] FROM DynamicRegistration_QuestionResponse drqr join Users uu on drqr.userID = uu.UserID) as SourceTable
  92. PIVOT
  93. (
  94.     MIN(Response) FOR DynamicQuestionID IN (
  95. [12E574D0-A991-4C9C-83BC-944D1FEF8041],
  96. [B56192FB-9337-47B9-8FD6-8016F9E6AF7D],
  97. [1634D0FB-CB3F-441E-A5CE-6F71D80B5DCD],
  98. [CC23F214-2863-43BE-B72F-E746D914D454],
  99. [4AF367F4-F846-404A-A203-B6564D50B1F7],
  100. [FCA3EB39-4920-42CA-B6F9-56427AE21BD0],
  101. [926156B4-B950-466F-A865-D3B1F63069F6],
  102. [B410C684-7819-4E45-B6CE-B76B20A61FEF],
  103. [F721444F-0160-4E48-9585-6DE0FCBA6400],
  104. [7623DEBB-0788-4989-A3EB-0F203052DD81],
  105. [C0A98210-D757-4696-B7CB-31E9A3B556AE],
  106. [CA61B664-3507-4C03-B08A-49B91AEF3470],
  107. [7396CE9B-B06C-4E5E-B7F0-A69D32511A69],
  108. [7436255B-EE92-4007-9E7F-40F78E72DA45],
  109. [AB436ED0-63E6-4905-A14C-9E8309B279B4],
  110. [A9956F51-ADA3-4C8F-B9EE-DF358A1D0E11],
  111. [53519089-0DE4-402D-B85E-05DA7C732CC1],
  112. [F045A7CD-03D1-41E9-9345-A0C870AC5C9F],
  113. [81E94993-6780-4504-90D8-60616C6D66DF],
  114. [1AE05E65-DD74-4AC5-B94A-14BF7133CA42],
  115. [AD02A029-4A93-4D6C-9A06-6F201E5211BA],
  116. [3B0088B2-5075-42D2-A499-7EB20C36FFE0],
  117. [84499356-963F-4540-81BE-B08C357E9A56],
  118. [0774AD48-CDC0-428C-B468-CBF3AD8AC3F3],
  119. [D0CC131B-613F-457D-B420-A76AED59156D],
  120. [5FFB72B6-0135-4DC6-8A0D-D5339C77DBFA],
  121. [03FA241B-48F7-48BA-8D90-D0FA0412501D],
  122. [18F47D36-998E-4DC1-8C10-3F62CB55B885],
  123. [7C181503-707F-40CB-9ED2-414F0F83A9E1],
  124. [4395C611-C979-4F9D-97DA-24B4875B4268],
  125. [FDA38B11-53C5-45E4-975B-EE07611360C7],
  126. [0A3E04D1-C5FF-44E5-A28B-92B87CE2794B],
  127. [3F003C94-3A0B-4254-AF0D-4234AD2563F6],
  128. [5B926A76-1600-4FB9-BADF-02F316A3F7C5],
  129. [2F5D19AB-AB95-4BAD-A305-D2B8FA4A5698],
  130. [0D1C41B1-CED2-46F4-8C53-A506435FDAE7],
  131. [34E015BF-13E7-43BB-B547-196045E1AF5A],
  132. [99EC561A-E9B1-48F6-9E15-A349E657E097],
  133. [3A0E0CE7-8F1B-4340-9C3E-CA8A30FC3472],
  134. [4BEF1241-19C9-4FC2-95DD-F4657942620D],
  135. [24575112-C4E6-403A-A841-EF552E394E6C],
  136. [335F012C-12CA-4469-863E-59EB412ACA67],
  137. [90B4B3D3-02C4-483A-9C3B-FF35B8443CE8],
  138. [95739B69-A6DB-47A0-A5EC-350766B4DC6E],
  139. [AA8DA6E6-7889-4FC3-9525-2BED4B51F5C3],
  140. [F2D8EDF1-47E7-456F-93E6-DE067939219B],
  141. [1BD5212E-9E61-49E4-A373-3A88B64404C1],
  142. [4BE1C64B-3026-4413-86B1-299CB6E82C30],
  143. [1652BEBD-A5FE-47F3-816A-ABD4DD2D858C],
  144. [866FC525-7A7A-4D08-8348-EFA381CB3BFC],
  145. [97D0E38B-9AD4-44B8-BF30-AC9856534DB8],
  146. [CD91B517-868C-459C-9603-23E0F93D13E5],
  147. [AF8322F8-F269-4DD3-9521-0D18EA7F0C14],
  148. [EDFA8022-2258-4CB3-B959-05B89157C56D],
  149. [2BB52A96-9E5B-4135-955E-0B991A44D3B8],
  150. [AD871E7D-93A3-4FD8-A219-3CAE030908C1],
  151. [0D48F917-CEAD-48A8-BC59-886B0B5B6EC0],
  152. [32F2A7FF-8A9E-40D4-9467-D77D708B193E],
  153. [7CD79DDF-3F61-430C-8F5E-ADA1E40C994A],
  154. [2308B735-AA11-4490-B370-D3DB02B43E40],
  155. [EEA71CE7-AC8E-452E-BDAA-324F6A8C9EDF],
  156. [A251E4B7-92B5-4454-BBF9-0AD3C77A73F1],
  157. [CA31AF19-0F7D-456B-9191-B0D38D5F063C],
  158. [22EE1290-806E-47BC-840C-AABC8339A1A8],
  159. [020110E7-0C2E-4560-9094-88892B54995F],
  160. [841B58F7-2AED-4C68-83B1-CD3BF5895CE6],
  161. [3BE50041-AD5A-4CF7-95DC-8E5A3B10700B],
  162. [C070CDFC-C00A-416C-AA4F-ECAB76139E90],
  163. [7DFFC1EC-C4FD-4B1C-A361-E3EE0E41B14C],
  164. [61A9AB05-7999-4424-B70B-793B42F9CE1D],
  165. [2DFE98C6-1037-477C-A6A7-B9CB18DD3C9A],
  166. [D2D4295D-918B-4240-A2BD-620F745F3B23],
  167. [BC5D2218-4870-43E9-9CB0-791DB9539A1C],
  168. [BCEED6AC-F9EB-425C-B19D-08CC1883DF96],
  169. [2C6F7411-39BF-465E-8873-185377F91583],
  170. [2FC4063C-E5BE-4AAB-96E5-1CE8217DE5B6],
  171. [D9C05632-6128-40AD-9255-4E0ABEB0FE69],
  172. [23168323-56E6-423C-B9DD-5F4004F5E8ED]
  173. )
  174.  
  175. ) AS PivotTable
  176. SET NOCOUNT OFF
Add Comment
Please, Sign In to add comment