Re: loading tables via SQL script

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



tnx for the reply...
I'm not a Access guy, or a SQL guy -
so basically I have this 1GB text file with the commands & data embedded,
and have no idea - outside of stripping out each text element manually -
how to get the data into an Access file so I have something
that I have a chance of manipulating to get to the html blog data
that was basically stored as blob entries.

SO - given all that -
where or how do I start :)
maybe it's nothing more than "pointing" Access at the text file
and clicking "do it" - not sure how to do that -

"Arvin Meyer [MVP]" <arvinm@xxxxxxxxxxxx> wrote in message
news:e$Brb4VjJHA.4976@xxxxxxxxxxxxxxxxxxxxxxx
You can use similar scripts within VBA code or in a query like:

CREATE TABLE tblContacts
([ContactID] counter,
[LastName] text (30),
[FirstName] text (30),
[FullName] text (60),
[ContactDate] date,
[Notes] memo,
CONSTRAINT [ContactID] PRIMARY KEY ([ContactID]));

CREATE UNIQUE INDEX FullName ON tblContacts (LastName, FirstName);

In VBA, you'd do:

Dim strSQL
strSQL = "CREATE UNIQUE INDEX FullName ON tblContacts (LastName,
FirstName);"
CurrentDB.Excecute strSQL
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"ps56k" <pschuman_no_spam_me@xxxxxxxxxxxxx> wrote in message
news:OcOHGqUjJHA.1252@xxxxxxxxxxxxxxxxxxxxxxx
Is this an embedded SQL script for defining & re-loading the tables ?

If MS Access can support this technique,
and all the SQL commands used are valid for MS Access,
then where and how do I point Access at the script ?
Are there parts missing ?

Just trying to get all the html blob data from the old website into a
place
where we can review and export it back out into new physical web pages.

I have what appears to be a plain text backup file
from Wordpress used on a now closed team website.

The website we used for one of our teams
was not renewed last year, and is gone.

I have all the files, including what appears to be a backup file
of the Wordpress blog used to maintain the website.
A snipet is included below.
How can I use this backup file to load an MS Access database ?
It appears to be a list of SQL commands
with the actual text data embedded within the stream.

I really just want a single table - the one with all the formatted text
blog
entries...
-----

DROP TABLE IF EXISTS `wp_posts`;
#
# Table structure of table `wp_posts`
#
CREATE TABLE `wp_posts` (
`ID` bigint(20) unsigned NOT NULL auto_increment,
`post_author` bigint(20) NOT NULL default '0',
`post_date` datetime NOT NULL default '0000-00-00 00:00:00',
`post_date_gmt` datetime NOT NULL default '0000-00-00 00:00:00',
`post_content` longtext NOT NULL,
`post_title` text NOT NULL,
`post_category` int(4) NOT NULL default '0',
`post_excerpt` text NOT NULL,
`post_status`
enum('publish','draft','private','static','object','attachment','inherit','future')
NOT NULL default 'publish',
`comment_status` enum('open','closed','registered_only') NOT NULL
default
'open',
`ping_status` enum('open','closed') NOT NULL default 'open',
`post_password` varchar(20) NOT NULL default '',
`post_name` varchar(200) NOT NULL default '',
`to_ping` text NOT NULL,
`pinged` text NOT NULL,
`post_modified` datetime NOT NULL default '0000-00-00 00:00:00',
`post_modified_gmt` datetime NOT NULL default '0000-00-00 00:00:00',
`post_content_filtered` text NOT NULL,
`post_parent` bigint(20) NOT NULL default '0',
`guid` varchar(255) NOT NULL default '',
`menu_order` int(11) NOT NULL default '0',
`post_type` varchar(20) NOT NULL default 'post',
`post_mime_type` varchar(100) NOT NULL default '',
`comment_count` bigint(20) NOT NULL default '0',
PRIMARY KEY (`ID`),
KEY `post_name` (`post_name`),
KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=233 DEFAULT CHARSET=latin1 ;

#

# Data contents of table `wp_posts`
#
INSERT INTO `wp_posts` VALUES (2, 2, '2006-02-11 11:52:32', '2006-02-11
19:52:32', '<p align="center">&nbsp;</p>\r\n<p align="center"><font
size="4"><strong>Welcome to Naperville North Boys Track &amp; Field<br
/>\r\n</strong><em>Home of the Huskies!<br />\r\n</em></font><font
size="4"><br />\r\n</font></p>\r\n<p align="left"><font size="1">The
Boys
Track and Field Team provides student athletes an opportunity to feel
good
about themselves and their performances. We focus on PRs or Personal
Records
which indicate improvement as result of committment to the team, its
coaches, and to oneself. The Huskies believe in measuring individual
performance by measuring their teammates accomplishments. In doing so,
student athletes invest in their fellow team members and enhance their
own
ability to achieve PRs. Most of all, we love to compete and
have&nbsp;fun!
</font></p>\r\n<p align="left">The subpages to the right should supply
you
with all the information you will need regarding the details of our
program.
In addition, their are numerous printable PDF forms for your
convience.</p>\r\n<p align="left">Thanks for visiting our site.
.........................................








.



Relevant Pages

  • Re: How I can sysnchronize changes in DataTable with my Database?
    ... Do you mean whether ADO .NET can generate the commands for you? ... Does your question actually mean "I don't want to bother with all that SQL. ... >>> DataTableMapping tableMapping) ... >>> foreach(DataRow myDataRow in myDataTable.Rows) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [Full-disclosure] Two biggest Indian University Websites are vulnerable
    ... telling you a website was unsafe, and 3 people for a login SQL. ... Sikkim Manipal University portal is vulnerable to SQL Injection attack. ... Sandeep Sengupta; Cyber Security Research ...
    (Full-Disclosure)
  • Re: Post Revised: A Desperate Plea for Help
    ... I got your point that generated sql is often inadequate. ... generated commands may be inadequate" but "Use the dataadapter's Update ... That's why my advice was to call the data adapter's Update method. ... But the bottom line here is that you need to create the SQL Statements ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: DataGrid problem.
    ... (and SQL) ... as well as the Insert and Update commands? ... > dataAdapters sql commands parameters Value field, ... >> to the grid, it is automatically assigned a NULL value when a new row is ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • RE: MS SQL, find list of tables
    ... connected to the Access ODBC driver. ... MS SQL, find list of tables ... Audit your website security with Acunetix Web Vulnerability Scanner: ... Up to 75% of cyber attacks are launched on shopping carts, forms, ...
    (Pen-Test)