Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Wednesday, March 21, 2012

from xml to database

I have an xml file I need to parse and add the data to a database. What
is the best way to do this. Are there any good articles/code samples to
do this
DaveHow big is the XML file?
Is the data in the elements or attributes of the XML document?
Is this a one time import or something you'll be doing on a regular basis?
"dfetrow410@.hotmail.com" wrote:

> I have an xml file I need to parse and add the data to a database. What
> is the best way to do this. Are there any good articles/code samples to
> do this
> Dave
>

from xml to database

I have an xml file I need to parse and add the data to a database. What
is the best way to do this. Are there any good articles/code samples to
do this
Dave
How big is the XML file?
Is the data in the elements or attributes of the XML document?
Is this a one time import or something you'll be doing on a regular basis?
"dfetrow410@.hotmail.com" wrote:

> I have an xml file I need to parse and add the data to a database. What
> is the best way to do this. Are there any good articles/code samples to
> do this
> Dave
>

From SQL Express to XML file

HI guys,

Is there any tool to import the database from SQLExpress to change it into XML without doing much programming code in .Net?

Thanks!

Chin

Hi Chin,

The short answer is no, SQL Express doesn't include any import/export tools. That said, Transact-SQL provides syntax that lets you represent your data as XML, and you could use that to produce XML and then save that to a file.

Check out my answer to a similar question at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=368472&SiteID=1 for links to pertinent BOL topics.

Regards,

Mike Wachal
SQL Express team

-
Please mark your thread as Answered when you get your solution.

From SQL Express to XML file

HI guys,

Is there any tool to import the database from SQLExpress to change it into XML without doing much programming code in .Net?

Thanks!

Chin

Hi Chin,

The short answer is no, SQL Express doesn't include any import/export tools. That said, Transact-SQL provides syntax that lets you represent your data as XML, and you could use that to produce XML and then save that to a file.

Check out my answer to a similar question at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=368472&SiteID=1 for links to pertinent BOL topics.

Regards,

Mike Wachal
SQL Express team

-
Please mark your thread as Answered when you get your solution.

sql

Sunday, February 26, 2012

free text search

does anyone have code that shows how to separate individual words from a sentence.

e.g. i have a list of questions and answers in my database and have the following query for it:

SELECT question, Answer
FROM QuestionsAnswer
WHERE FREETEXT(Question, 'i want to travel around the world and learn about cooking')

so i want to extend the above query so that takes each key word (travel, cooking, learn) to find out how frequently that particular word appears in the question (for ranking purposes).

I know freetexttable does rank results, but they don't seem accurate enough for what i need to do.

HELP!!!i've just been told that freetext does this anyways...

=D|||have u tried search on the web|||You will need:

* A one column list (table) with all unimportant words. For that purpose I used a 20-year-old Commodore 64 text adventure interpreter list.

* A two column list (table) with the important words and the number of total occurences for each word.

You parse your text with space, comma, etc as word seperators and run each word against the first list. If it is not their you search it in the second list. If it is their you increment the occurence counter. If it is not their you add it with an occurence counter=1.

Check your second list from time to time in order to see if you can transfer a word from list 2 to list 1.

Easy, isn't it ?

Free SQL Code beautifier for SQL Server

Hello,
maybe you are interested in this.
I wrote a java applet on www.sqlinform.com which is a SQL Code beautifier / formatter. It is for all kind of SQL (DB2, ORACLE; Access, Informix, etc). The only thing you need is a Java Runtime Environment (which should be available in most cases). You can beautify SQL statements out of program code and format them for Java, ASP, VB, PHP.
Regards
GuidoMarcelthat's really cool
now i can feel pretty, oh so pretty!!|||another development project in search of a problem?

I am getting a little tired of self promoters using this message board.|||If its useful and he's genuinely not trying to sell anything, I don't have any issues with it. I think it would be cool to have a spot on the forum where people could post useful and reusable functions/procs/utilities etc...|||its free, it works and promoting hasnt really even begun to get out of hand here.
and i can prove it! all you have to do is buy my new DVD at www.whogivesacrap.com

Friday, February 24, 2012

free code

Hello, I am 13 years old and trying to create a mmorpg(massively multiplayer online role playing game) and need a database so people can register, buy weapons, kill other people, etc. The only problem is, I only know javascript and html. I was wondring if anyone had free code for MS Server 2000 that users of my game register, and it records the users username, password, etc.
Thanks so much,

-tylerhttp://lab.msdn.microsoft.com/express/sql/

And you should google data modeling techiques BEFORE youstart build the database

Or ask here

Good Luck|||http://lab.msdn.microsoft.com/express/sql/dude, he's not looking for sql server itself, he's apparently already got a database server, he's looking for application code

specifically, "that users of my game register, and it records the users username, password, etc."|||He should ask an Elf. They are supposed to be good at data modeling and get +2 on all schemas they create.

Though I hear dwarves excel at data-mining...|||well, he asked the experts

and three trolls answered ;)|||Trolls, as every game designer knows, automatically regenerate code.|||Tyler,

There are so many different ways that this task can be handled, depending upon the requirements of the application, that I don't think you are going to find a black-box solution you can succesfully drop into your program.

The good news is that tracking users is not a very complicated task, so it should not require many tables or a lot of SQL coding, depending upon how complex you want the security and user-rights to be.

And since you are only 13, you have many years to figure out what is going to work best for you.

If you decide to take on this task and have specific questions, then please post them here and we will try to help you out.

...now go finish your homework!|||tyler
pick up a copy of database design for the mere mortal.
and read how the tables and data relate to each other.
then start designing your db and ask as many questions here as you can.|||dude, he's not looking for sql server itself, he's apparently already got a database server, he's looking for application code

specifically, "that users of my game register, and it records the users username, password, etc."

Dude?

Already got a database server?

OK, so it's not crack...but what is it?

I think it's a martini Friday...|||thanks guys... though you didn't give me the code, i am glad you have responded... And i convinced my dad to create a database for me. He is a programmer...

Thanks Again

-Tyler|||Yeah dad! Go dad!

Dads are great.