July 30, 2018 at 9:19 am
Good day all,
Please i need help in analysing a survey data that i gathered using a web app. I have done it before and i have never faced the error that i'm getting now.
The error i'm getting is :
Msg 511, Level 16, State 1, Line 2
Cannot create a row of size 9130 which is greater than the allowable maximum row size of 8060.
This is my code:
select InterviewerName,RetailerName,StoreName,Address,Phone,Email,Gender,MaritalStatus,Location,MordernTrade,NeighborhoodStore,OpenMarket,Question1,Question2,Question3,Question4,Question5_1,Question5_2,Question5_3,Question5_4, Question5_5,Question5_6,Question5_7,Question5_8,Question5_9,Question5_10,Question5_11,Question6a,Question6b,Question7a,Question7b,Question8a,Question8b,Question9a,Question9b,Question10_1,Question10_2,Question10_3,Question10_4,Question10_5,Question10_6,Question10_7,Question11_1,Question11_2,Question11_3,Question11_4,Question11_5,Question11_6,Question11_7,Question12,Question13a,Question13b,Question13c,Question13d,Question13e_1,Question13e_2,Question13e_3,Question13e_4,Question13e_5,Question13e_6,Question13e_7,Question13e_8,Question13e_9,Question14,Question15_1,Question15_2,Question15_3,Question15_4,Question15_5,Question15_6,Question15_7,Question15_8,Question15_9,Question15_10,Question15_11,Question15_12,Question16,Question17a,Question17b,Question17c_1,Question17c_2,Question17c_3,Question17c_4,Question17c_5,Question17c_6,Question17c_7,Question18a_1,Question18a_2,Question18a_3,Question18a_4,Question18a_5,Question18a_6,Question18a_7,Question18a_8,Question18a_9,Question18a_10,Question18a_11,Question18b_1,Question18b_2,Question18b_3,Question18b_4,Question18b_5,Question18b_6,Question18b_7,Question18b_8,Question18b_9,Question18b_10,Question18b_11,Question18b_12,Question18c_1,Question18c_2,Question18c_3,Question18c_4,Question18c_5,Question18c_6,Question18c_7,Question18c_8,Question18c_9,Question18c_10,Question18c_11,Question19,Question20,Question21a,Question21b,Question22,Question23a_1,Question23a_2,Question23a_3,Question23a_4,Question23a_5,Question23a_6,Question23a_7,Question23a_8,Question23a_9,Question23a_10,Question23b_1,Question23b_2,Question23b_3,Question23b_4,Question23b_5,Question23b_6,Question23b_7,Question23b_8,Question23b_9,Question23b_10,Question23c_1,Question23c_2,Question23c_3,Question23c_4,Question23c_5,Question23c_6,Question23c_7,Question24,Question25,Question26_1,Question26_2,Question26_3,Question26_4,Question26_5,Question27_1,Question27_2,Question27_3,Question27_4,Question27_5,Question27_6,Question27_7,Question27_8,Question28,Question29a,Question29b,Question30_1,Question30_2,Question30_3, Question30_4,Question30_5,Question30_6,Question30_7,Question31_1,Question31_2,Question31_3,Question31_4,Question31_5,Question31_6,Question31_7,Question31_8,Question31_9,Question31_10,Question31_11,Question32,Question33,Question33i_1,Question33i_2,Question33i_3,Question33i_4,Question33i_5,Question33i_6,Question33i_7,Question33i_8,Question33i_9,Question34_1,Question34_2,Question34_3,Question34_4,Question34_5,Question34_6,Question34_7,Question35a_1,Question35a_2,Question35a_3,Question35a_4,Question35a_5,Question35a_6,Question35a_7,Question35a_8,Question35a_9,Question35a_10,Question35a_11,Question35b_1,Question35b_2,Question35b_3,Question35b_4,Question35b_5,Question35b_6,Question35b_7,Question35b_8,Question35b_9,Question35b_10,Question35b_11,Question36_1,Question36_2,Question36_3,Question36_4,Question37,Question38a_1,Question38a_2,Question38a_3,Question38a_4,Question38a_5,Question38a_6,Question38a_7,Question38a_8,Question38a_9,Question38a_10,Question38ai,Question38aii,Question38aiii,Question38aiv,Question38av,Question38avi,Question38avii,Question38aviii,Question38aix,Question38ax,Question38b_1,Question38b_2,Question38b_3,Question38b_4,Question38b_5,Question38b_6,Question38b_7,Question38b_8,Question38b_9,Question38b_10,Question38c_1,Question38c_2,Question38c_3,Question38c_4,Question38c_5,Question38c_6,Question38c_7,Question38c_8,Question38c_9,Question38c_10,Question38ci,Question38cii,Question38ciii,Question38civ,Question38cv,Question38cvi,Question38cvii,Question38cviii,Question38cix,Question38cx,Question39a_1,Question39a_2,Question39a_3,Question39a_4,Question39a_5,Question39a_6,Question39a_7,Question39a_8,Question39a_9,Question39a_10,Question39ai,Question39aii,Question39aiii,Question39aiv,Question39av,Question39avi,Question39avii,Question39aviii,Question39aix,Question39ax,Question39b_1,Question39b_2,Question39b_3,Question39b_4,Question39b_5,Question39b_6,Question39b_7,Question39b_8,Question39b_9,Question39b_10,Question39ci,Question39cii,Question39ciii,Question39civ,Question39cv,Question39cvi,Question39cvii,Question39cviii,Question39cix,Question39cx,Question40a_1,Question40a_2,Question40a_3,Question40a_4,Question40a_5,Question40a_6,Question40b_1,Question40b_2,Question40b_3,Question40b_4,Question40b_5,Question40b_6,Question40c_1,Question40c_2,Question40c_3,Question40c_4,Question40c_5,Question40c_6,txtQuestion41 as Question41,Question42_1,Question42_2,Question42_3,Question42_4,Question42_5,Question42_6
from
(
select PhoneNumber, QuestionName, Answer
from SingleAnswers where year(questiondate) = year(GetDate()) and phonenumber like '%grocery%'
) z
pivot
(
max(Answer)
for QuestionName in (InterviewerName,RetailerName,StoreName,Address,Phone,Email,Gender,MaritalStatus,Location,MordernTrade,NeighborhoodStore,OpenMarket,Question1,Question2,Question3,Question4,Question5_1,Question5_2,Question5_3,Question5_4, Question5_5,Question5_6,Question5_7,Question5_8,Question5_9,Question5_10,Question5_11,Question6a,Question6b,Question7a,Question7b,Question8a,Question8b,Question9a,Question9b,Question10_1,Question10_2,Question10_3,Question10_4,Question10_5,Question10_6,Question10_7,Question11_1,Question11_2,Question11_3,Question11_4,Question11_5,Question11_6,Question11_7,Question12,Question13a,Question13b,Question13c,Question13d,Question13e_1,Question13e_2,Question13e_3,Question13e_4,Question13e_5,Question13e_6,Question13e_7,Question13e_8,Question13e_9,Question14,Question15_1,Question15_2,Question15_3,Question15_4,Question15_5,Question15_6,Question15_7,Question15_8,Question15_9,Question15_10,Question15_11,Question15_12,Question16,Question17a,Question17b,Question17c_1,Question17c_2,Question17c_3,Question17c_4,Question17c_5,Question17c_6,Question17c_7,Question18a_1,Question18a_2,Question18a_3,Question18a_4,Question18a_5,Question18a_6,Question18a_7,Question18a_8,Question18a_9,Question18a_10,Question18a_11,Question18b_1,Question18b_2,Question18b_3,Question18b_4,Question18b_5,Question18b_6,Question18b_7,Question18b_8,Question18b_9,Question18b_10,Question18b_11,Question18b_12,Question18c_1,Question18c_2,Question18c_3,Question18c_4,Question18c_5,Question18c_6,Question18c_7,Question18c_8,Question18c_9,Question18c_10,Question18c_11,Question19,Question20,Question21a,Question21b,Question22,Question23a_1,Question23a_2,Question23a_3,Question23a_4,Question23a_5,Question23a_6,Question23a_7,Question23a_8,Question23a_9,Question23a_10,Question23b_1,Question23b_2,Question23b_3,Question23b_4,Question23b_5,Question23b_6,Question23b_7,Question23b_8,Question23b_9,Question23b_10,Question23c_1,Question23c_2,Question23c_3,Question23c_4,Question23c_5,Question23c_6,Question23c_7,Question24,Question25,Question26_1,Question26_2,Question26_3,Question26_4,Question26_5,Question27_1,Question27_2,Question27_3,Question27_4,Question27_5,Question27_6,Question27_7,Question27_8,Question28,Question29a,Question29b,Question30_1,Question30_2,Question30_3, Question30_4,Question30_5,Question30_6,Question30_7,Question31_1,Question31_2,Question31_3,Question31_4,Question31_5,Question31_6,Question31_7,Question31_8,Question31_9,Question31_10,Question31_11,Question32,Question33,Question33i_1,Question33i_2,Question33i_3,Question33i_4,Question33i_5,Question33i_6,Question33i_7,Question33i_8,Question33i_9,Question34_1,Question34_2,Question34_3,Question34_4,Question34_5,Question34_6,Question34_7,Question35a_1,Question35a_2,Question35a_3,Question35a_4,Question35a_5,Question35a_6,Question35a_7,Question35a_8,Question35a_9,Question35a_10,Question35a_11,Question35b_1,Question35b_2,Question35b_3,Question35b_4,Question35b_5,Question35b_6,Question35b_7,Question35b_8,Question35b_9,Question35b_10,Question35b_11,Question36_1,Question36_2,Question36_3,Question36_4,Question37,Question38a_1,Question38a_2,Question38a_3,Question38a_4,Question38a_5,Question38a_6,Question38a_7,Question38a_8,Question38a_9,Question38a_10,Question38ai,Question38aii,Question38aiii,Question38aiv,Question38av,Question38avi,Question38avii,Question38aviii,Question38aix,Question38ax,Question38b_1,Question38b_2,Question38b_3,Question38b_4,Question38b_5,Question38b_6,Question38b_7,Question38b_8,Question38b_9,Question38b_10,Question38c_1,Question38c_2,Question38c_3,Question38c_4,Question38c_5,Question38c_6,Question38c_7,Question38c_8,Question38c_9,Question38c_10,Question38ci,Question38cii,Question38ciii,Question38civ,Question38cv,Question38cvi,Question38cvii,Question38cviii,Question38cix,Question38cx,Question39a_1,Question39a_2,Question39a_3,Question39a_4,Question39a_5,Question39a_6,Question39a_7,Question39a_8,Question39a_9,Question39a_10,Question39ai,Question39aii,Question39aiii,Question39aiv,Question39av,Question39avi,Question39avii,Question39aviii,Question39aix,Question39ax,Question39b_1,Question39b_2,Question39b_3,Question39b_4,Question39b_5,Question39b_6,Question39b_7,Question39b_8,Question39b_9,Question39b_10,Question39ci,Question39cii,Question39ciii,Question39civ,Question39cv,Question39cvi,Question39cvii,Question39cviii,Question39cix,Question39cx,Question40a_1,Question40a_2,Question40a_3,Question40a_4,Question40a_5,Question40a_6,Question40b_1,Question40b_2,Question40b_3,Question40b_4,Question40b_5,Question40b_6,Question40c_1,Question40c_2,Question40c_3,Question40c_4,Question40c_5,Question40c_6,txtQuestion41,Question42_1,Question42_2,Question42_3,Question42_4,Question42_5,Question42_6)
) piv
This is the singleanswers table below with sample data, the sample data contains just 126 rows, which when pivoted will give only one row.
But actually i have over 90,000 rows that i want to pivot. Please what is the best way of going about it.
Thanks
Tim
Sample Data Below:
CREATE TABLE [dbo].[SingleAnswers](
[ID] [int] IDENTITY(1,1) NOT NULL,
[PhoneNumber] [nvarchar](max) NULL,
[QuestionName] [nvarchar](max) NULL,
[Answer] [nvarchar](max) NULL,
[AnswerValue] [nvarchar](max) NULL,
[QuestionDate] [datetime] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[SingleAnswers] ON
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87178, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'InterviewerName', N'Adjarho Gladys', N'Adjarho Gladys', CAST(0x0000A92B01138A58 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87179, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'RetailerName', N'Kingsley Ifeanyi', N'Kingsley Ifeanyi', CAST(0x0000A92B01138A5D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87180, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'StoreName', N'Chi food', N'Chi food', CAST(0x0000A92B01138A5D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87181, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Address', N'East west road by alakhia', N'East west road by alakhia', CAST(0x0000A92B01138A5D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87182, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Phone', N'00000000000', N'00000000000', CAST(0x0000A92B01138A5D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87183, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Email', N'None', N'None', CAST(0x0000A92B01138A5D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87184, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Gender', N'1', N'Male', CAST(0x0000A92B01138A62 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87185, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'MaritalStatus', N'1', N'Married', CAST(0x0000A92B01138A62 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87186, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Location', N'3', N'Port Harcourt', CAST(0x0000A92B01138A62 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87187, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'MordernTrade', N'', N'', CAST(0x0000A92B01138A62 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87188, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'NeighborhoodStore', N'', N'', CAST(0x0000A92B01138A62 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87189, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Outlet', N'3', N'3', CAST(0x0000A92B01138A66 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87190, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'OpenMarket', N'9', N'Oil & Spices & Condiments', CAST(0x0000A92B01138A66 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87201, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question1', N'2', N'1yr – 2 yrs.', CAST(0x0000A92B0113D059 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87202, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question2', N'Relative', N'Other (Specify)----------', CAST(0x0000A92B0113D05D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87203, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question3', N'2', N'1yr – 2 yrs.', CAST(0x0000A92B0113D05D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87204, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question4', N'3', N'Secondary', CAST(0x0000A92B0113D05D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87205, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question5_2', N'2', N'Nestle Products', CAST(0x0000A92B0113D067 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87206, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question5_11', N'11', N'Cap rice', CAST(0x0000A92B0113D067 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87224, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question6a', N'3', N'Straight from the open market', CAST(0x0000A92B0113EC29 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87225, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question6b', N'I buy from the market', N'I buy from the market', CAST(0x0000A92B0113EC29 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87226, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question7a', N'The price we buy from the market', N'The price we buy from the market', CAST(0x0000A92B0113EC2E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87227, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question7b', N'2', N'I calculate how much naira I will make', CAST(0x0000A92B0113EC2E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87259, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question8a', N'1', N'Yes', CAST(0x0000A92B0114473D AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87265, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question8b', N'6', N'Selling wears/shoe/bags', CAST(0x0000A92B0114922A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87310, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question9a', N'2', N'No', CAST(0x0000A92B01153499 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87314, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question10_1', N'1', N'Customers demand', CAST(0x0000A92B01156646 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87315, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question10_2', N'2', N'If there is opportunity of becoming a key distributor', CAST(0x0000A92B01156646 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87316, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question11_1', N'1', N'The products are fast selling', CAST(0x0000A92B01157C52 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87317, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question11_2', N'2', N'You have good turnover/ You have good return on investment', CAST(0x0000A92B01157C52 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87318, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question12', N'1', N'Less than N20,000', CAST(0x0000A92B01157C52 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87334, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question13a', N'2', N'No, we only operate in this place.', CAST(0x0000A92B0115E279 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87335, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question13d', N'2', N'No', CAST(0x0000A92B0115F22A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87346, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question14', N'2', N'Between N100k to N500k', CAST(0x0000A92B01160AB8 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87347, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question15_10', N'10', N'Oils & Seasonings', CAST(0x0000A92B01160AB8 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87348, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question16', N'3', N'Small Sizes e.g. Sachets', CAST(0x0000A92B01160ABD AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87349, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question17a', N'2', N'No', CAST(0x0000A92B01160ABD AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87375, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question18a_2', N'2', N'Nestle Products – Milo, Nescafe', CAST(0x0000A92B01169217 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87376, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question18a_11', N'11', N'King''s oil, Gino tomatoes, power oil', CAST(0x0000A92B01169217 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87377, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question18b_11', N'11', N'', CAST(0x0000A92B0116921C AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87378, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question18c_11', N'11', N'Power oil', CAST(0x0000A92B01169220 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87393, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question19', N'6', N'Other family member', CAST(0x0000A92B0116E238 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87394, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question20', N'1', N'Just One staff', CAST(0x0000A92B0116E238 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87395, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question21a', N'2', N'No, we don’t have', CAST(0x0000A92B0116E238 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87414, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question23a_5', N'5', N'Evening (4.01pm – 6.00pm).', CAST(0x0000A92B01170125 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87415, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question23b_5', N'5', N'Friday', CAST(0x0000A92B01170125 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87416, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question23b_6', N'6', N'Saturday', CAST(0x0000A92B01170129 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87417, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question23c_5', N'5', N'Any week of the month', CAST(0x0000A92B01170129 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87418, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question24', N'2', N'Between 10 -20', CAST(0x0000A92B01170129 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87419, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question25', N'2', N'We are on rent', CAST(0x0000A92B01171AE3 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87420, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question26_4', N'4', N'No plan for now. To maintain this outlet.', CAST(0x0000A92B01171B2A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87421, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question27_5', N'5', N'We buy from good sources', CAST(0x0000A92B01171B4A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87422, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question28', N'8', N'Can’t say/don’t know/don’t do', CAST(0x0000A92B01171B67 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87423, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question29a', N'2', N'No', CAST(0x0000A92B01172126 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87435, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question30_4', N'4', N'Beach Umbrellas', CAST(0x0000A92B01173A04 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87436, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question31_3', N'3', N'We reduce prices for customers', CAST(0x0000A92B01173A04 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87437, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question31_8', N'8', N'Good customer relations', CAST(0x0000A92B01173A09 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87438, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question31_9', N'9', N'Our products are of good quality', CAST(0x0000A92B01173A09 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87439, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question32', N'3', N'Don’t know', CAST(0x0000A92B01173A09 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87440, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question33', N'2', N'No', CAST(0x0000A92B01173A09 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87444, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question30_4', N'4', N'Beach Umbrellas', CAST(0x0000A92B0117427A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87445, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question31_3', N'3', N'We reduce prices for customers', CAST(0x0000A92B0117427E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87446, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question31_8', N'8', N'Good customer relations', CAST(0x0000A92B0117427E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87447, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question31_9', N'9', N'Our products are of good quality', CAST(0x0000A92B0117427E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87448, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question32', N'3', N'Don’t know', CAST(0x0000A92B0117427E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87449, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question33', N'1', N'Yes', CAST(0x0000A92B01174283 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87471, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question33i_1', N'1', N'Fake products', CAST(0x0000A92B011752EB AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87476, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question34_1', N'1', N'Give us credit facility', CAST(0x0000A92B01175B4E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87477, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question34_3', N'3', N'Provide incentives to give our customers', CAST(0x0000A92B01175B4E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87481, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question35a_11', N'11', N'Power oil', CAST(0x0000A92B0117A14A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87482, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question35b_11', N'11', N'None', CAST(0x0000A92B0117A14A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87483, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question36_1', N'1', N'Nothing', CAST(0x0000A92B0117A14A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87484, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question37', N'They produce different product', N'They produce different product', CAST(0x0000A92B0117A14A AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87485, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38ai', N'', N'', CAST(0x0000A92B0117A14E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87486, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38a_2', N'2', N'Maggi', CAST(0x0000A92B0117A14E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87487, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38aii', N'400g', N'400g', CAST(0x0000A92B0117A14E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87488, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38aiii', N'', N'', CAST(0x0000A92B0117A14E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87489, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38aiv', N'', N'', CAST(0x0000A92B0117A14E AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87490, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38av', N'', N'', CAST(0x0000A92B0117A153 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87491, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38avi', N'', N'', CAST(0x0000A92B0117A153 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87492, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38avii', N'', N'', CAST(0x0000A92B0117A153 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87493, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38aviii', N'', N'', CAST(0x0000A92B0117A158 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87494, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38aix', N'', N'', CAST(0x0000A92B0117A158 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87495, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38ax', N'', N'', CAST(0x0000A92B0117A158 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87496, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38b_2', N'2', N'Maggi', CAST(0x0000A92B0117A15C AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87497, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38ci', N'', N'', CAST(0x0000A92B0117A15C AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87498, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38cii', N'It''s affordable', N'It''s affordable', CAST(0x0000A92B0117A15C AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87499, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38ciii', N'', N'', CAST(0x0000A92B0117A15C AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87500, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38civ', N'', N'', CAST(0x0000A92B0117A15C AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87501, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38cv', N'', N'', CAST(0x0000A92B0117A161 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87502, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38cvi', N'', N'', CAST(0x0000A92B0117A161 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87503, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38cvii', N'', N'', CAST(0x0000A92B0117A161 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87504, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38cviii', N'', N'', CAST(0x0000A92B0117A161 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87505, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38cix', N'', N'', CAST(0x0000A92B0117A161 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87506, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question38cx', N'', N'', CAST(0x0000A92B0117A166 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87529, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39ai', N'', N'', CAST(0x0000A92B0117FA9B AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87530, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39aii', N'', N'', CAST(0x0000A92B0117FAA5 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87531, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39aiii', N'', N'', CAST(0x0000A92B0117FAA5 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87532, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39aiv', N'', N'', CAST(0x0000A92B0117FAA5 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87533, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39av', N'', N'', CAST(0x0000A92B0117FAA5 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87534, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39avi', N'', N'', CAST(0x0000A92B0117FAA5 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87535, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39a_7', N'7', N'Cerelac', CAST(0x0000A92B0117FAA9 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87536, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39avii', N'400g', N'400g', CAST(0x0000A92B0117FAA9 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87537, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39aviii', N'', N'', CAST(0x0000A92B0117FAAE AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87538, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39aix', N'', N'', CAST(0x0000A92B0117FAAE AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87539, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39ax', N'', N'', CAST(0x0000A92B0117FAAE AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87540, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39b_7', N'7', N'Cerelac', CAST(0x0000A92B0117FAAE AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87541, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39ci', N'', N'', CAST(0x0000A92B0117FAAE AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87542, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39cii', N'', N'', CAST(0x0000A92B0117FAB3 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87543, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39ciii', N'', N'', CAST(0x0000A92B0117FAB3 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87544, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39civ', N'', N'', CAST(0x0000A92B0117FAB3 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87545, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39cv', N'', N'', CAST(0x0000A92B0117FAB3 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87546, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39cvi', N'', N'', CAST(0x0000A92B0117FAB3 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87547, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39cvii', N'It''s expensive', N'It''s expensive', CAST(0x0000A92B0117FAB3 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87548, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39cviii', N'', N'', CAST(0x0000A92B0117FAB7 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87549, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39cix', N'', N'', CAST(0x0000A92B0117FABC AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87550, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question39cx', N'', N'', CAST(0x0000A92B0117FABC AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87551, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question40a_6', N'6', N'None', CAST(0x0000A92B0117FAC1 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87552, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question40b_2', N'2', N'Gift with Purchase', CAST(0x0000A92B0117FAC1 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87553, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question40b_4', N'4', N'Customer loyalty programs', CAST(0x0000A92B0117FAC1 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87554, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question40b_5', N'5', N'Buy one get one free', CAST(0x0000A92B0117FAC1 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87555, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question40c_2', N'2', N'Gift with Purchase', CAST(0x0000A92B0117FAC1 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87556, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question40c_5', N'5', N'Buy one get one free', CAST(0x0000A92B0117FAC1 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87557, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'txtQuestion41', N'They should sell at Lowe''s rate for us', N'They should sell at Lowe''s rate for us', CAST(0x0000A92B0117FAC5 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87558, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question42_3', N'3', N'Give us trade incentives', CAST(0x0000A92B0117FAC5 AS DateTime))
GO
INSERT [dbo].[SingleAnswers] ([ID], [PhoneNumber], [QuestionName], [Answer], [AnswerValue], [QuestionDate]) VALUES (87559, N'00000000000 GrocerySurvey7/28/2018 4:43:12 PM', N'Question42_5', N'5', N'Run good loyalty programs with us', CAST(0x0000A92B0117FAC5 AS DateTime))
GO
SET IDENTITY_INSERT [dbo].[SingleAnswers] OFF
GO
July 30, 2018 at 9:24 am
That wide a pivot is going to fail because SQL Server simply can not handle a row that wide. This is the kind of thing much better handled by using a matrix control in SSRS. It also saves you the excess query time needed to perform the pivot. You can't fix this in T-SQL. It's a hard limit for a PIVOT query. You may be able to use a CROSSTAB query, but given how wide this is, you may run across the same problem.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
July 30, 2018 at 1:06 pm
sgmunson - Monday, July 30, 2018 9:24 AMThat wide a pivot is going to fail because SQL Server simply can not handle a row that wide. This is the kind of thing much better handled by using a matrix control in SSRS. It also saves you the excess query time needed to perform the pivot. You can't fix this in T-SQL. It's a hard limit for a PIVOT query. You may be able to use a CROSSTAB query, but given how wide this is, you may run across the same problem.
Thanks very much sgmunson for pointing me in the right direction, i've already started learning how to use SSRS
Thanks
Tim
July 30, 2018 at 2:29 pm
I'm curious. Who would read a row like that? What is this good for?
There's a good reason for people in Microsoft not trying to deliver a wider row. It's because there's something wrong with the requirement.
Now, I'm not sure if you're trying to insert this data into a table or if it's just a SELECT statement. I would have guessed that with a SELECT statement you shouldn't get an error as long as you keep the number of columns below 4,096.
If you really want to handle 90K rows converted into columns, I'd suggest that you rethink your approach or your tool.
July 30, 2018 at 3:13 pm
Luis Cazares - Monday, July 30, 2018 2:29 PMI'm curious. Who would read a row like that? What is this good for?
There's a good reason for people in Microsoft not trying to deliver a wider row. It's because there's something wrong with the requirement.
Now, I'm not sure if you're trying to insert this data into a table or if it's just a SELECT statement. I would have guessed that with a SELECT statement you shouldn't get an error as long as you keep the number of columns below 4,096.
If you really want to handle 90K rows converted into columns, I'd suggest that you rethink your approach or your tool.
Hi Luis,
Actually, its a maximum of 159 columns, but the pivot is trying to fix every possible combination before it now arranges it, hence its hitting the limit.
And also, its a research result, something like an ssps statistical report, which will be further worked on. Its supposed to be placed in an excel sheet for further processing.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply