Jump to content
UBot Underground

How do you insert a .csv file into a database with the databse query command?


Recommended Posts

HI Guys

 

I have been trying to figure out how to do you insert a .csv file into a database with the databse query command?

This has me stumped.

Could someone post a code sample here just to see how the loop works to create the insert statements for each row?

 

Any help would be appreciated

 

Regards

 

Matt

Link to post
Share on other sites

As far as I know you have to loop through the hole file.

 

ie

 add csv to table and loop each row. sucks on big files.

 

I know you can do from command line the hole file at once. You will have to search Google on that one you will find easy.

 

This is for SQLite Plugin from Aymen. The DB commands from Ubot idk know to much about, this is what I know here http://wiki.ubotstudio.com/wiki/Database_Commands

 

HTH,

TC

Link to post
Share on other sites

Hi Thanks for the reponse.

 

Now that UBot can connect to a database it has really caught my attention. It would be great if they can expand on making db commands more efficient so processes can easily be implemented so we can bulk move lots of data more easily.

Loving where its going though

Link to post
Share on other sites

hi
i realy didnt see the problem...
if u need a frequently query with fillup data to your database  why u dont do a define with needet columns and placeholders for your data?

same with get data....make a querytemplate as define and fill it up

Link to post
Share on other sites

mdc 101
normal i try to be helpfull for all but to do a example means lot of work.
i dont use a definetemplate for my selft because im fast with sql-statements

so i dont needet...

 

but if u realy need help that would means for me explane u step by step what a template for sql does

so dont understand me wrong i dont wanna melk a cow  but u have to spend some bucks for

 

if u ready lemmy know

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...