char(x) "Dex" <virginilijus@one.lt> wrote in message news:hjs26e$kfp$1@trimpas.omnitel.net... > koks lauko, i kuri insertini tipas DB? > > Dex > > Pilas rašė: >> >> sveiki, >> >> turiu excel lapa ir kurio reikai suimportuoti kodus i SQL lentele kaip >> charakterius. >> >> pasirasiau su CAST : >> ------------------------------------- >> >> insert INTO [Baze].[dbo].[list] >> >> SELECT cast( [code] as char(20)) >> >> FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', >> >> 'Excel 8.0;Database=C:\SQL\baze\list.xls', >> >> 'SELECT * FROM [Sheet1$]') >> >> ---------------------------------------- >> >> bet dalis kodu nesusiimportuoja teisingai : kodai 6 zenklu tvarkingai >> gaunasi : 123456, o visi 7-zenkliai gaunasi kaip skaicius : 1.2345e+006 >> >> jei bandau trumpinti char - tada netelpa meta klaida " Arithmetic >> overflow error for type varchar, value = 5266700.000000" cia turetu >> buti kodas 5266700 - 7zenklis. >> >> cia mano SQL pradmenys, todel labai nemuskit. >> >> >> >> >> >> >> >> >> >>