| Author |
Topic |
|
kashyap_sql
Posting Yak Master
174 Posts |
Posted - 2010-07-28 : 06:48:44
|
i had noticed how to change excel sheet to sql server right now i want to know how can i change a data in notepad to sql server can any body helps With RegardsKashyap M |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-28 : 07:17:54
|
| What to you mean by "change a data in notepad to sql server"????Does it mean you want to import data from notepad into sql server?Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-07-28 : 07:20:36
|
The data (columns) inside your flat file should be delimited by a sign like , or ; or tab or | or another sign.This then is called a CSV file.Otherwise the columns should be of fixed length. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
kashyap_sql
Posting Yak Master
174 Posts |
Posted - 2010-07-28 : 07:38:01
|
let me explain for example if i had a data that is in the form of 1,dasdj,adshsjdh,dsjhsj2,zfcds,asdjasjd,asjdh3,ssjd,sajdjsdh,adjd this not the data just an exampleWith RegardsKashyap M |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-07-28 : 07:50:48
|
And what is your problem?How did you make the excel-import?I think this is a similar way. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
kashyap_sql
Posting Yak Master
174 Posts |
Posted - 2010-07-28 : 07:54:00
|
| no i had done the excel by your help in the way the both ways are not similar i am sure i had tried already in that wayWith RegardsKashyap M |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-07-28 : 08:22:03
|
So in for your excel file you have used this?SELECT * INTO TenantdetailsFROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=d:\Tdetails.xls', 'SELECT * FROM [Tdetails$]')Then for your flat file try this:SELECT * INTO TenantdetailsFROM OPENROWSET('MSDASQL','Driver={Microsoft Text Driver (*.txt; *.csv)}','SELECT * FROM file.csv') No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
kashyap_sql
Posting Yak Master
174 Posts |
Posted - 2010-07-28 : 08:25:20
|
| exactly you are right With RegardsKashyap M |
 |
|
|
kashyap_sql
Posting Yak Master
174 Posts |
|
|
kashyap_sql
Posting Yak Master
174 Posts |
Posted - 2010-07-28 : 08:28:09
|
quote: Originally posted by webfred So in for your excel file you have used this?SELECT * INTO TenantdetailsFROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=d:\Tdetails.xls', 'SELECT * FROM [Tdetails$]')Then for your flat file try this:SELECT * INTO TenantdetailsFROM OPENROWSET('MSDASQL','Driver={Microsoft Text Driver (*.txt; *.csv)}','SELECT * FROM file.csv') No, you're never too old to Yak'n'Roll if you're too young to die.
i do not have clarity because i am new bee to this sql server what to do is some thing in itWith RegardsKashyap M |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-28 : 08:32:05
|
| Read about OPENROWSET in SQL Server help fileMadhivananFailing to plan is Planning to fail |
 |
|
|
kashyap_sql
Posting Yak Master
174 Posts |
Posted - 2010-07-28 : 08:50:35
|
| i got the output from the notepad to sqlWith RegardsKashyap M |
 |
|
|
|