Click here to Skip to main content
14,601,203 members
Rate this:
Please Sign up or sign in to vote.
i want to convert data excel to sql without any changes .is this possible?????

What I have tried:

i created database in ssms and then import data into sql . table is created in database but when i convert huge amount of data data became random . like slno not in manner. how can i solve this problem????????
Updated 27-Jul-17 23:56pm
Richard MacCutchan 30-Jun-17 3:59am
"how can i solve this problem?".
Maybe by fixing your code. But if you want help here then you need to provide some proper details of what is going wrong.
Member 13284521 30-Jun-17 4:39am
my actual data in excel format and i want to convert that data into sql database without any changing. i try data is converted into sql in table format but problem is data not in sequence .
Richard MacCutchan 30-Jun-17 4:58am
Then you need to do some investigation with your debugger to find out why this happens. You cannot expect anyone here to guess what your code is doing.
Member 13284521 30-Jun-17 5:01am
thank you so much
Pat O'Brien 30-Jun-17 7:46am
or could it be something as simple as adding an ORDER BY clause to your SQL select statement...

SELECT * FROM [TableName]
ORDER BY [slno]
Member 13284521 30-Jun-17 8:52am
i try it sir but problem is when i want to move that ordered record into another table records still random.
Lazar Jovovic 3-Jul-17 4:16am
As people already said - you need to provide us with more details to figure out the issue.
Anyway, if I'm not mistaken, you have data in Excel format that you want to load to SQL database (confirm if this is correct). One of the most efficient way to achieve this is by using SSIS tool.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

I think your slno in excel, may be a char format, so that's the reason sql cann't be sort properly.

you should check your table design, and check slno format.

and you also make a query from excel with concatenation.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100