-1

If data like

"700133 70013303102021SC  25 210604580000000440"
"700133 70013303102021SC  26 210604600000010000"

need roll number like "80000000440" and "600000010000" how will separate the data and to load in table which are already created

Thom A
  • 88,727
  • 11
  • 45
  • 75
  • Simple searching will find many example and discussions of importing text files into a database using tools provided with SQL Server. If you don't have separators, then presumably your file contains data in a fixed format / position. That's an option with the wizard - suggest you give it a try. – SMor Nov 27 '21 at 23:44

1 Answers1

0

There isn't sufficient Information about DB and how you would load this data to any table. Because of this I could share only SELECT Query with you :

SQL SERVER:
SELECT RIGHT('700133 70013303102021SC  25 210604580000000440', 11) AS String;

ORACLE:
select substr('700133 70013303102021SC  25 210604580000000440',-11) AS String from dual;
dwh_asil
  • 5
  • 7
  • the data is in flat file without separation, if we have separations we can proceed with SELECT and INSERT INTO and BULK INSERT also – Surendra Bommineni Nov 26 '21 at 14:24
  • You are right. Without delimiter/separator it is harder. If I could find a way to do it, I will share it with you. – dwh_asil Nov 26 '21 at 15:46