Jump to content

Ms Sql Server Technology Discussions


9Pardhu

Recommended Posts

[quote name='Kaarthikeya' timestamp='1364231111' post='1303484429']
nuvvu cheppinavanni possible kaaledane ikkada post chesa bhayya :3D_Smiles_38:

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 sSa_j@il
[/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...

Link to comment
Share on other sites

[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? sCo_^Y

Link to comment
Share on other sites

[quote name='Kaarthikeya' timestamp='1364239463' post='1303485424']


OPENROWSET ki OLEDB ODBC laga evo drivers provide chesi format files ivvalemo ga malli? sCo_^Y
[/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...

Link to comment
Share on other sites

[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

Link to comment
Share on other sites

[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...

Link to comment
Share on other sites

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........

Link to comment
Share on other sites

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............

Link to comment
Share on other sites

[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...

Link to comment
Share on other sites

[quote name='Kaarthikeya' timestamp='1364231111' post='1303484429']
nuvvu cheppinavanni possible kaaledane ikkada post chesa bhayya :3D_Smiles_38:

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 sSa_j@il
[/quote]

SSIS cheyyochu ante derive column use chesi cheyyochuuu....


r T-sql ante LIKE operator use cheyyochu gaaa???!!

Link to comment
Share on other sites

[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 :P

Link to comment
Share on other sites

[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

Link to comment
Share on other sites

ee line to line read aithe chestondi kaani unwanted rows delete cheyyadam elago ardham kaavatledu :3D_Smiles_38:

Link to comment
Share on other sites

[quote name='Kaarthikeya' timestamp='1364329698' post='1303491455']
ee line to line read aithe chestondi kaani unwanted rows delete cheyyadam elago ardham kaavatledu :3D_Smiles_38:
[/quote]

aa line to line read chesedi edo ikkada veyyi... emanna expand cheyocchu emo try cheddam...

Link to comment
Share on other sites

[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]

Link to comment
Share on other sites

×
×
  • Create New...