loveindia Posted March 25, 2013 Report Posted March 25, 2013 [quote name='Kaarthikeya' timestamp='1364231111' post='1303484429'] nuvvu cheppinavanni possible kaaledane ikkada post chesa bhayya sare the data in txt file looks something like this: 1, Kaarthikeya, India, CreditCard, Purchased Dairy Milk Product, $3.00 2, deals2buy, USA, DebitCard, Purchased Orange Chutney, $100.00 aa paina data lo delimiter vachesi "," (comma)...daani batti neeku avanni fields ani ardhamayuntundi... ippudu oka customer oka location lo oka product kontaadu...aa product konnappudu aa product name tho last but one column update avutundi....say if u buy Bataanilu, then the column would be updated as 'Purchaes Bataanilu' so nenu text file ni motham line by line or as a whole read chesi 'Purchased Dairy Milk Product' ani unna rows anni exclude chesi remaining rows ni inko file lo load cheyyali.... and mundu cheppinattu idantha T-SQL use chesi matrame cheyyali [/quote] OPEN ROWSET ani oka function untadi.. Built in feature... google chey.. you will find it.. you can use that to do this ani anpistondii... unfortunately BULK LOAD are prohibited at my place, so I can't do that... adi issue... you will find on google regarding that...
deals2buy Posted March 25, 2013 Report Posted March 25, 2013 [quote name='loveindia' timestamp='1364239343' post='1303485401'] OPEN ROWSET ani oka function untadi.. Built in feature... google chey.. you will find it.. you can use that to do this ani anpistondii... unfortunately BULK LOAD are prohibited at my place, so I can't do that... adi issue... you will find on google regarding that... [/quote] OPENROWSET ki OLEDB ODBC laga evo drivers provide chesi format files ivvalemo ga malli?
loveindia Posted March 25, 2013 Report Posted March 25, 2013 [quote name='Kaarthikeya' timestamp='1364239463' post='1303485424'] OPENROWSET ki OLEDB ODBC laga evo drivers provide chesi format files ivvalemo ga malli? [/quote] format files akkarledu anukuntaa... direct ga cheydaniki kuda untadi... but drivers maatram edo provide cheyyali.. eppudu use cheyledu... but chusta for ur case if there is any turnaround using just sql...
deals2buy Posted March 25, 2013 Report Posted March 25, 2013 [quote name='loveindia' timestamp='1364243972' post='1303485891'] format files akkarledu anukuntaa... direct ga cheydaniki kuda untadi... but drivers maatram edo provide cheyyali.. eppudu use cheyledu... but chusta for ur case if there is any turnaround using just sql... [/quote] ok..meanwhile nenu try chesaanu koddi varaku...but I didn't get how to delete or extract the rows I wanted...so still in the process
loveindia Posted March 25, 2013 Report Posted March 25, 2013 [quote name='Kaarthikeya' timestamp='1364244792' post='1303485997'] ok..meanwhile nenu try chesaanu koddi varaku...but I didn't get how to delete or extract the rows I wanted...so still in the process [/quote] open rowset loney where conditions vaadochu... see that...
ghazni Posted March 25, 2013 Report Posted March 25, 2013 nenu OPENROWSET vadanu to import the data from oracle server to sql server.. kani adi linked server lo unadi so i could do that... if the data is more, than the query might take long time... naku chinna table key 10- 15 tisukunedi........
ghazni Posted March 25, 2013 Report Posted March 25, 2013 nidi edo conversion type lo undi........ merge statement use chesava..... andulo convert cheyochu anukunta kada source to destiantion ki ......... just giving u an idea i am not sure though............
loveindia Posted March 25, 2013 Report Posted March 25, 2013 [quote name='ghazni' timestamp='1364245984' post='1303486098'] nidi edo conversion type lo undi........ merge statement use chesava..... andulo convert cheyochu anukunta kada source to destiantion ki ......... just giving u an idea i am not sure though............ [/quote] Merge Statement??? It is used for incremental loads kada.. Well, since he doesn't want data into a table, i think the only option he has is a rowset. temp table loki cheyochu antey there are 'n' number of ways... or DTS import/export best...
mtkr Posted March 26, 2013 Report Posted March 26, 2013 [quote name='Kaarthikeya' timestamp='1364231111' post='1303484429'] nuvvu cheppinavanni possible kaaledane ikkada post chesa bhayya sare the data in txt file looks something like this: 1, Kaarthikeya, India, CreditCard, Purchased Dairy Milk Product, $3.00 2, deals2buy, USA, DebitCard, Purchased Orange Chutney, $100.00 aa paina data lo delimiter vachesi "," (comma)...daani batti neeku avanni fields ani ardhamayuntundi... ippudu oka customer oka location lo oka product kontaadu...aa product konnappudu aa product name tho last but one column update avutundi....say if u buy Bataanilu, then the column would be updated as 'Purchaes Bataanilu' so nenu text file ni motham line by line or as a whole read chesi 'Purchased Dairy Milk Product' ani unna rows anni exclude chesi remaining rows ni inko file lo load cheyyali.... and mundu cheppinattu idantha T-SQL use chesi matrame cheyyali [/quote] SSIS cheyyochu ante derive column use chesi cheyyochuuu.... r T-sql ante LIKE operator use cheyyochu gaaa???!!
loveindia Posted March 26, 2013 Report Posted March 26, 2013 [quote name='mtkr' timestamp='1364257728' post='1303487045'] SSIS cheyyochu ante derive column use chesi cheyyochuuu.... r T-sql ante LIKE operator use cheyyochu gaaa???!! [/quote] file to file and dynamic data conversion.. without using tables.. adi requirement... chadaavaali requirement mari baaga
deals2buy Posted March 26, 2013 Report Posted March 26, 2013 [quote name='loveindia' timestamp='1364248241' post='1303486316'] Merge Statement??? It is used for incremental loads kada.. Well, since he doesn't want data into a table, i think the only option he has is a rowset. temp table loki cheyochu antey there are 'n' number of ways... or DTS import/export best... [/quote] http://msdn.microsoft.com/en-us/library/aa276850%28v=sql.80%29.aspx I don't think this works...naa daggara userid and pwd em undavu...moreover it seems like we can only deal with some kind of database objects
deals2buy Posted March 26, 2013 Report Posted March 26, 2013 ee line to line read aithe chestondi kaani unwanted rows delete cheyyadam elago ardham kaavatledu
loveindia Posted March 26, 2013 Report Posted March 26, 2013 [quote name='Kaarthikeya' timestamp='1364329698' post='1303491455'] ee line to line read aithe chestondi kaani unwanted rows delete cheyyadam elago ardham kaavatledu [/quote] aa line to line read chesedi edo ikkada veyyi... emanna expand cheyocchu emo try cheddam...
deals2buy Posted March 26, 2013 Report Posted March 26, 2013 [quote name='loveindia' timestamp='1364330155' post='1303491550'] aa line to line read chesedi edo ikkada veyyi... emanna expand cheyocchu emo try cheddam... [/quote] [CODE] EXECUTE @OLEResult = sp_OACreate 'Scripting.FileSystemObject', @FS OUT EXEC @OLEResult = sp_OAMethod @FS, 'OpenTextFile', @FileID OUT, @FileName, 1, 1 EXECUTE @OLEResult = sp_OAMethod @FileID, 'ReadLine', @Message OUT WHILE @OLEResult >= 0 BEGIN PRINT @Message EXECUTE @OLEResult = sp_OAMethod @FileID, 'ReadLine', @Message OUT END [/CODE]
Recommended Posts