Exporting from SQL to CSV?

07/24/2011 14:26 viper4513#1
Hi, firstly iĉm sorry if this has already been answered somewhere in the forums hundreds of times, or if it is a really simple thing and i'm completely stupid for not knowing how to do it... but, how on earth do you extract a table from your database, and make it into a CSV file?

I want it for Casters ShStudio tool, and i need the CSV of dbo.Mobs and dbo.MobItems so i can actually edit drops and so on, as he explains in the tutorial in his thread.

I've seen it said somewhere that you can extract this way using LPH's tool, but i havnt worked out how to extract to CSV files, i only get the Sdata files.

I'm using SQL 2005, and it doesnt seem to have an import/export option, unless i'm overlooking it somewhere.

Is there a simple way, or quiery to get just those 2 tables in full csv format, so that i can continue to edit.

Thanks for any help you can give on this subject, it's been driving me mad for 2 days now. And again, i'm sorry if this has already been asked numerous times.

&& I've also tried using python's batch thing to get the files, but from that i only get a file called Monster.complete, which doesnt seem like the right file i need.
07/24/2011 16:02 [Admin]Snuggle#2
USE PS_GameDefs;
SELECT * FROM MobItems

That's how how you select a table
Right click on the results and save them as any name it will save as csv.
Just change the PS_GameDefs part to whatever database you want to select from.
Then change the MobItems part to whatever table you want.
07/24/2011 19:20 stinka123#3
use Ms office 2010, easy to have it
07/24/2011 20:44 [Admin]Snuggle#4
Office has nothing to do with what viper is asking for. Other than viewing csv files in excel.
07/24/2011 21:56 viper4513#5
Thank you Snuggle, you're a life saver, i was seriously beggining to contemplate how long it would take for my laptop to reach the floor from my window after trying to work out how to get that info!! :P
Something so damn simple aswell, the way i was trying, was to open the table, and select all data, then copy and paste into excel / access / notepad, but obviously none of thse worked :)
07/25/2011 04:56 stinka123#6
i used it, and i know it have
SQL can import Data from SQL sv. search googl how to do it
07/25/2011 09:18 -III-#7
If you are using SQL 2005 Express, it can be a pain as compared to other versions.

I always recommend to everyone that if you can get your hands on EMS's SQL Manager, use it. It makes several tasks of this sort much easier.

Export to Excel, CSV, ODF, and many others are as easy as a right click on the table name.
07/25/2011 12:24 viper4513#8
Where were you when i was setting all those programs up, III ?? :)

Not to worry now tho, thanks to Snuggle i managed to get it all sorted, 2 nice and clean CSV files, imported into Casters amazing tool, and all working how it should be :)
10/15/2011 21:14 shaiya_VG#9
check out FlowHeater. You will be impressed. I used it to pull all data out of bases in XL. Then I can edit easily using formulas. Next, I use FlowHeater to reverse the flow of data back into the bases. Limit 10000 records on free version. You can also add extra columns to your XL for making editing easier (i.e. notes about what vars actually do in-game). And FlowHeater will ignore them. Very nice utility.
10/15/2011 21:36 viper4513#10
Totally pointless post there shaiya_VG
This was fixed months ago, and the thing you were "advertising" would be kinda useless in most shaiya DB's if that is what it is even for.. As most the useful database tables have over 10,000 records.

Request close, cuz it was answered fully instantly.