April 29, 2020 at 4:04 pm
CREATE TABLE [dbo].[NewTable1](
[18/10/2020 date] [nvarchar](255) NULL
) ON [PRIMARY]
GO
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (N'This is test file')
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (NULL)
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (N'20-20-2020')
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (NULL)
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (N'ID,name,sal')
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (N'10,mahi,2000')
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (N'20,ravi,1000')
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (N'30,ram,3000')
INSERT [dbo].[NewTable1] ([18/10/2020 date]) VALUES (N'total emp:3')
As per above script data will store in a single column with cama separate or any other delimiter which is semicolon ; etc.. so first i need to find out in which row header will be there and based on header (ID,name,sal') i need to create table schema dynamically.. so may be in another table i have more columns that has to automatically create table with that header..
Kindly help on this ....
April 29, 2020 at 4:26 pm
Thank you.. I am sorry But that unanswered question is regarding SSIS process from txt file.. This having next task which is data will be in Sql server table.. From that need to find header and create table.. I am sorry now i have unsubscribe the old one..
April 30, 2020 at 2:03 pm
can you please help on this task
April 30, 2020 at 2:34 pm
can you please help on this task
Yes but let's stop this thread and take it back to the original thread where I see you've provided the information I asked for. I can't help right this instant because I'm working but will have a go of it tonight.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply