Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Shared Column Data Transfer


I have two tables with one shared column. One other column in table 2 is empty but has to get filled with a value from one column in table 1.

select * from tbl1, tbl2 where tbl1.column = tbl2.column;

Above query gives me the results that need to be updated. What will the update statement look like?




View Complete Forum Thread with Replies

Related Forum Messages:
How Often Is Best To Create New Database, Migrate Data With Shared Hosting?
I have got a web site that I have ben working on since March, 2007. It is a news reporting web site. It is replacing an older web site.

I created a new database (it uses the MySQL database) last March when I started working on the new web site. I have migrated all of the news content from the old web site database to the new web site database.

I have a shared web hosting. It's my understanding that the hosting service provider fills up one server with databases then starts a new server with databases.

For example, the IP for the server that is hosting the current database for the new web site is 10.6.166.5

I just created a new database (the hosting allows you to have ten databases per shared hosting). The IP for the server for the recently created database for the new web site hosting is 10.6.166.92

If the servers are ordered sequentially there have been 87 new servers filled up with databases since last March (i.e. 10.6.166.92 recently created IP minus 10.6.166.5 March, 2007 IP equals 87 servers).

The problem with migrating the nine-month old database to the new database is that I have got over a thousand news stories and two thousand pictures stored in the database with the 10.6.166.5 IP address. I would have to copy and paste all of the data into the phpMyAdmin program or write a PHP script that would automate the process.

Is there any benefit to migrating the 10.6.166.5 March, 2007 IP database over to the more recently created 10.6.166.92 IP database? Would it be reasonable to expect the more recently created database to perform better over the next 12 to 18 months than the one created nine months ago?

View Replies !
Data Transfer
i didnt found a way to describe what i want and tried to use the search but i think i was searching for the wrong keywords.
any way this is what i was wondering:

i have the table A and B with:
id,time,msg

table B is a blocked table where every new insert goes to first.
then if approved it gets moved to table A.
i was wondering if there is a way to read the 'id X' from table B and insert into table A with one single query.
Like:

SELECT * FROM b WHERE id = x THEN INSERT INTO a WHAT WAS RETURNED

View Replies !
Transfer Of Data
I want to transfer some columns of data to another table.
How can I do that with single query?

View Replies !
Data Transfer By Tar And Zip
We are trying to transfer db of approx 786 MB having around 120,000 tables, PHPmyadmin fails to take dump and even mysqldump command gives table lock error

So we tried the var/lib/mysql and zipped the db folder and unzipped on another server by created db

We used zip -r . command to zip the folder. When we unzipped it did not work on another server.

We also tried this solution

--------------------------------
cd /var/lib/mysql
tar -czf yourdb.tar yourdb

then FTP yourdb.tar to the new server, or put it in some web folder and wget it from the new server. After you get it in the new server:

tar -xzf yourdb.tar
mv yourdb /var/lib/mysql
chown mysql /var/lib/mysql/yourdb -R
------------------------------------

View Replies !
MySQl Data Transfer
i want to transfer a huge amount of data which is maintained over
windows running PHPTriad. PHPTriad can dump data and schema/structure
into a text file.

now i want to transfer this data to Red Hat Linux 7.2 running
APACH/PHP/MYSQL.

View Replies !
Data Transfer Services
Does anyone did DTS using MYSQL before?
thinking to migrate from MSSQL to MYSQL.. If MYSQL can do DTS, then I don't need to do scripting to transfer data.

View Replies !
Using Mysqldump To Transfer Data
I'm trying to transfer data from 1 table (from another database) into another table (into my database) and specify a date range somehow. To elaborate I have this employee database that has employees added every week. I'd like to grab last week's batch and transfer them into my database to display on a webpage. Last week's batch would include every employee added up to ..last friday.
Can the mysqldump command do that or do I need to write out some kinda script in order to do this?

View Replies !
Data Base Transfer
Im trying to learn if it is possible to transfer data from one mysql to another with a diferent structure ie different table names etc am I beating my head against a brick wall? .... its thick enuf.

View Replies !
Data Transfer From One Server To Another
I want to transfer large amount of data in mysql from one unix server to another unix server which is hosting mysql as well.how can i do that?

View Replies !
Transfer Data To Text File
I need to transfer data from a table to a text file. I do not know how to get started.

View Replies !
Data Transfer From MySQl To SQl Server
I want to transfer data from MySQL to SQL server. I like to do this using scripts.

View Replies !
Email To Spreadsheet Data Transfer
I am trying to develop a form that can be emailed to about 1000+ employees and load their responses into a spreadsheet. We are using SharePoint Enterprise with InfoPath / Outlook to run the project. I can get the form to work but cannot get the spreadsheet to load the data.

View Replies !
Transfer A Data Base To My Site
i've create a data base with phpmyadmin in my computer and now I want to put it in my site...it's possible to do it? And how?

View Replies !
MyODBC Connection Dies During Data Transfer
I've got a table of about 400,000 records but when I transfer it from Access to MySQL, the ODBC connection dies around 3,000 records or so (or about 3-5mins) with this error:

ODBC -- call failed

[MySQL][ODBC 3.51 Driver][mysqld-3.23.41] Lost connection to MySQL server
during query (#2013)

Once this error occurs, the table and uploaded records are removed from MySQL.

But I've transferred other tables with a few thousand records just fine. One query even runs for about 10 minutes or more with no problem.

Any ideas?

View Replies !
Transfer Data From One Table To Another In Different DB Connected Under Different User
Im using VB.Net and MySQl 5.0 . I have two database each having a lookuptable in it
I m login into each database as different user and both database resides in the same server. During a particular operation I need to get the data from 'lookuptable' in the First DB to 'lookuptable' in the Second DB. Currently I was using looping in the VB.Net part but its taking long time to complete as the data is 2-3lakh. Could anybody please help how to resolve this issue using a "Insert into select query" in MySQl , but please remember The DB are different and the users to connect to db are also diferent.

View Replies !
I Want To Make Transfer Data Between MySQL Server To MySQL Local .
I want to make transfer data between MySQL Server to MySQL Local .

My Environment.

Server < --- > My PC Client

Server =
::::: MySQL DB Server ( for Linux )
::::: Apache ..
::::: Linux

PC Client =
::::: Window
::::: MySQL run localhost ( for window )

How i transfer data from mysql server to mysql local .?
Caz i don't want to connect via 3306 port ..
Can i use others way?

View Replies !
Extract 5 Digit Column Data Into Another Column
i would like to make an update on my tables, which extract out the zip code from an address column into another new column call zipcode... coz the previous design of the table doesn't have this column.

View Replies !
UDF Shared Library
I am trying to create a User Defined Function (UDF) using mySql 4.1.11 (mysql-max-4.1.11 for Solaris 8).

I am trying to get the examples to work (udf_example.so) I have successfully compiled it and copied the resulting .so file to /usr/lib. The command 'crle' (like ldconfig on Linux) shows that /usr/lib is in the library path, but when I type in mysql:

 CREATE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so" 

I get the error 1126, Can't open shared library 'udfexample.so'

I've tries renaming the library 'libudf_example.so', but that didn't work either.
I don't know how to check what libraries mysql is looking through. I am just guessing that it uses the library path from 'crle'. Any ideas?

View Replies !
Shared Password
I've installed mySQL out of the box and set a new password for the root account, which works in the MySQL monitor but not with the mysqladmin tool.

Please can anyone advise whats going on or if I have to do anything else to get access to the admin tool?

View Replies !
Data Truncation: Data Too Long For Column 'DESCRIPCION' At Row 1
I'have this problem when i try to insert a simple text in a column VARCHAR (40).
If I exceed the 14 chars size, this exception is fired. I'm working with the mysql 5.0.41 and fails in the query browser and in my java app with the conector 5.0.6.

I'd tried to change to UTF my table, change to a VARCHAR(100),change to CHAR (100) and nothing it's function.

View Replies !
MySQL And Shared Storage
--=_D38DA341.B3D2A80A
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

I would like to set up a round robin cluster with mysql. The round robin =
would be done through the DNS to two different servers. Each of those =
servers would have mysql installed and each would reference the same data =
directory on our SAN. Are there any problems with doing this?
=20

View Replies !
MySQL-shared RPM Install
I'm having problems installing the shaired libraries. This RPM came from
the MySQL.com download site.

[root@localhost src]# rpm -i MySQL-shared-4.0.17-0.i386.rpm
warning: MySQL-shared-4.0.17-0.i386.rpm: V3 DSA signature: NOKEY, key ID
5072e1f5

View Replies !
Replication Using A Shared Fileserver
I thought of a radical way to do replication of MySQL servers.

Let's assume two MySQl servers access a shared mapped storage (/mnt/db) which is a local mount to a fileserver on the network. This fileserver is shared between the MySQL servers; which means any writes to /mnt/db appears immediately on /mnt/db on the other MySQL machine. Two MySQL servers may attempt to modify to the same file if we don't use synchronization.

My question is, first, can we do this without making patches to MySQL code, and somehow using some synchronization mechanism accross the two machines running MySQL server each. Or we need to patch MySQL code to support such architecture. Second, is it trivial or impossible to do, how much man-time it requires roughly.

View Replies !
Connections On Shared Server
I frequently get the error message:

Warning: mysql_connect(): User user1 has already more than 'max_user_connections' active connections in /home/.sites/60/site23/web/Connections/mysite.php on line 9

It's commercial web hosting on a shared server so I have no control over the server side of things. The php scripting has been written using the GUI in Dreamweaver.

Is there anything I can do to resolve this? Should I be using mysql_connect or mysql_pconnect, or is this not the problem? Do I need to include somewhere in my scripts a snippet which disconnects from the server? If so where would I put this? I am not all that familiar with php and mySQL, though I understand parts of it when looking at the code.

The database connection is made via a connection.php file produced by Dreamweaver which includes the database details etc.

My max connections are only 10. Is this the issue? It only seems to appear when I use php to edit or add to the mySQL database.

View Replies !
Find Shared Values
Say I have a one long Table of people and the foods they like.
How do I find all the foods that are like by both of two particular people?

ie
David peas
Kate sausages
Kate eggs
Bill eggs
Kate peas
Fred sausages
Fred peas

and i want to find out what both Fred and Fate like:

View Replies !
How To Find Out Values Shared By Some Members
I have a table contains words extracted from documents which are belonging to a number of categories. Each category contains a number of documents. For each category, I want to find out those words which occur at least in N documents belonging to this category.

Code:....

View Replies !
Multiple Database, 1 Shared Table, Is It Possible?
I Used MySQL for a long time dev under PHP 3, 4 and now 5

now i'm facing a problems that i solved in the past with php, but i wonder if MySQL could do it on it's own, that'll help me a lot.

Multiple database, 1 shared table, is it possible?

i mean, i already done with 5 install of Xoops CMS and modified it that every install is on the same database, with deifferents prefixes (like db1_ db2_ ...)
then i mod Xoops for each time it called for it's users or saved open sessions id in the DB it use the same table on all install... so the users seamlessly wonder about in 5 differents xoops install without disconnect and change username.

now i face the same problem, i need a multi-install or a single install of a core system that will act as a multi-install sofware, but with the same set of users, sessions and some other things.

View Replies !
Security For Shared Server.xml Passwords
I have an ISP that has the server.xml in a shared environment. The server.xml file is where my password is available for database access under connection pooling. I really would like to use connection pooling.

Does anyone know how I can protect my password from being viewed by others using the same server.xml file? I cannot get the administrator to change the protection of the file because others in the shared environment need to be able to view it.

View Replies !
Cannot Open Shared Object File!
i just upgraded from MySQL 4.1 to MySQL 5.1. But when i try to run a program, i'm getting this error:

error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory

View Replies !
Can A MySQL Database Be Shared Between Windows And Linux?
I've got Windows and Linux running on my computer, on seperate partitions. I also have a shared partition for stroing files, and can be read and written by either system.

I also have MySQL installed on both systems. When I make changes to the database in Windows, I have to do a dump of the database (or single tables) to a text file on my shared partition. I then have to switch into Linux and load that file into MySQL there. This is a bit of a hassle.

Is it possible to somehow store the database file on the shared partition, and use the same database from both OSes? This would be very convenient, since I wouldn't have to maintain two copies of the same database!

View Replies !
ODBC Connection To MySQL On Shared Hosted Website
I'm trying to connect to a mySQL database that exists in connection w/ my website. I created the database using c-panel. Everything that I use to access the website from my site uses "localhost" as the host name. I installed the ODBC drivers for Windows on my XP machine and am trying to connect from my local machine.

I am not sure what I should use for the hostname in that case -- I tried www.mysitename.com as the host but that didn't work. I also tried the IP address, but that didn't work either. I asked my host's support team, but haven't heard back from them yet. It's a shared hosting service. Any ideas on what the hostname should be?

View Replies !
Why Dont Shared Hosting Accounts Provide Stored Procedures And Triggers?
i am searching for 3 days now for a reliable, fast hosting company, which supports stored procedures and triggers on mysql5. most of them dont support this, because mysql5 has a design-flaw in which it stores procedures and triggers on a root level-area (tables mysql information_schema). due this logic, most of the hosting companies wont allow you to create/run procedures and triggers. funny, that hosting companies forbid you to use new technologies and methods to build faster.

View Replies !
Using Table A Column Row Data For Table B Column Headings
Is it possible to add column data in table A and have (dynamically linked) table B column headers?

View Replies !
Add Column And Data?
CREATE TABLE `games` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`valid` tinyint( 1 ) default '1',
`date_added` datetime default NULL ,
PRIMARY KEY ( `id` ) ,
KEY `id` ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =4229

This is my table structure I want to add one column change_id with auto increment value but id has primary key and i can't change it becoz some other tables are depends on it and relates to each other by id

It's huge data so i can't change manually
....any other idea how to get table like this

original table
id valid date_added
123 1 2008-12-09
211 1 2008-12-08
33 1 2008-11-30
45 1 2008-10-31
57 1 2008-10-31
666 1 2008-08-25

after change
id valid date_added change_id
123 1 2008-12-09 1
211 1 2008-12-08 2
33 1 2008-11-30 3
45 1 2008-10-31 4
57 1 2008-10-31 5
666 1 2008-08-25 6

View Replies !
All Data In One Column Set To Zero
We recently had a terrible data "crash".

For some reason one column in one table, the foreign key column, was all set to zero.

I need to find out if there is a possibility that it could be a bug? We have no code updating that column and are busy scouring the application to see if it could have been a coding mistake but thus far I'm still left with nothing.

The Data Centre reported a power surge just before the data went missing. Is it possible that this caused the loss of data? The applications using the DATABASE are on separate PC's. Could a loss of network link during a transaction cause this damage?

View Replies !
Move Data From One Column To Two Others
I have a text file that looks something like this:

Homer Simpson [Nuclear plant] /Marge/Lisa/Bart/.../.../

I have successfuly inserted the text file into a column in my mysql
database. However, I would now like to move the data into two other
columns. For example, I have three columns...name, location,
familymembers. I want to move everything contained in [] to location
and everything starting with the / to the familymembers column. Could
someone explain how to do this with mysql?

View Replies !
Bundle Data In Same Column?
I was wondering if it is a good idea to bundle data inside of columns? Say I have a text column that I put pipe-seperated strings in and then extract the data in my application when I need it.

I have a table called store with a column named store_inventory. The store_inventory contains | seperated strings like (just an example):

apples|oranges|grapes

I will lose the ability to make selects on certain values, but I will use less columns. Is this a good idea, or should I create a seperate column for each values instead?

View Replies !
Displaying Column Data As Bin
We have Designed a Table with 80+ Columns with Engine MYISAM

We have declared some of the Columns as the Datatype Varchar(200) , int(11) etc.

When we retrieve the Data using Select Query with Union Clause we see some of the Column Data displayed as bin but we do not declared any Column as Data Type Blob Or Long blob etc.

View Replies !
Duplicate Column Data
Here is the scenario

Inventory A was received on 10/2/2004
Inventory A was again received on 10/28/2004

For both records I retreive the same information however when doing so the only unique record on the information line will be the quantity distributed of Inventory A and the price that was distributed for Inventory A. I only want to show it once not duplicate. It would be a hideous task for someone to do before presenting this report. Can anyone please steer me in the right direction?
I have tried using distinct but I assume it will not work because of the two seperate dates a record has.

View Replies !
Swap Column Data From 2 Different Ows
I have a table named 'info' with columns named (int) 'usort' (varchar) name, with the following data:

info
usort name
1 Adam
2 Jeremy
3 Betty
4 Diana
5 Mark

Okay so basically I am trying to for instance, swap the 2 and 3 in usort, so that my table will now look like this:

info
usort name
1 Adam
3 Jeremy
2 Betty
4 Diana
5 Mark

This is what I've come up with so far:

update info as A, info as B set A.usort = 3, B.usort = 2 where A.usort = 2 and B.usort = 3

This seems to work fine, giving the expected results. But if I run the query again, I would expect that it should swap back, right? Instead, it does this:

info
usort name
1 Adam
2 Jeremy
2 Betty
4 Diana
5 Mark

View Replies !
No Data In Column When Using ORDER BY.
I have a simple poker tournament database, where I want to get a list of the players and how many points they have won.

I use this SQL statement:

select CONCAT(t1.lastname,', ',t1.firstname) as fullname,
GROUP_CONCAT(t2.position) as pos,

SUM(CASE t2.position WHEN 1 THEN 5 WHEN 2 THEN 3 WHEN 3 THEN 1 END) as sum from poker_players AS t1, poker_positions as t2 where t1.id = t2.player
GROUP BY t2.player;

to get this...

+--------------------+------+------+
| fullname | pos | sum |
+--------------------+------+------+
| x, x | 1 | 5 |
| y, y | 1 | 5 |
| z, z | 2 2 | 6 |
+--------------------+------+------+

but when I then want to sort on the sum column by adding ORDER BY sum DESC to the statement I get...
+--------------------+------+------+
| fullname | pos | sum |
+--------------------+------+------+
| z, z | | 6 |
| x, x | | 5 |
| y, y | | 5 |
+--------------------+------+------+

The result is sorted correct, but all the data in the pos column is lost What do I do wrong?

View Replies !
Updating Column Data
I have a mysql database that has a couple of columns that i want to dynamically store data in that is the total of other column data within the database. i can get the total to be saved in the totals column using the...

update tableName set totalColumn((col1*col2)+(col3*col4));

type of expression but this data won't automatically calculate/re-calculate the total if new data is added or changed like I would like it to.
can anyone give me an idea of what I can use to dynaimcally set a column's data to so it will re-act as data is entered or changed within the database?


View Replies !
Data Too Long For Column
Running 5.0.37-community-nt on windows 2003 server.

Having problems getting data to insert into blob table. I receive data too long for column. The file I'm pushing up is 578k. I can do smaller files, like 10k. All this worked until I upgraded from linux to windows and mysql from 4.0.16.

Orginally the inserts into this table would cause the entire database to crash. Windows event log showed a DR WATSON error. The mysql error log showed a normal shutdown. Should be noted that this failure actually occured without even naming the blob field name, ie 'INSERT INTO TABLE(ID) VALUES('1')'. I went ahead and just dropped the blob column, added it back with same name, and am now we getting the 'too long for column' message.

I've read that this could be a character set issue, however in changing it to what one of the mysql engineers suggested, it still didn't work, and also other queries began failing. ie Code:

View Replies !
Duplication Of A Data In A Column
if one column of one row has been changed.... can i cause all other rows to make that same column equal to the one changed?

View Replies !
How To Duplicate Column Data
I have a table. Mulitple columns. The two I'm concerned with are product values (prices). The first is the cover price for a magazine. The second is the purchase price for each issue. I want the purchase price to automatically match the cover price. This way, if I actually paid more for a particular issue, I only have to edit that one entry. Otherwise, the purchase price will always reflect the cover price as I input each new line.

View Replies !
Join Data From Same Column But Different Row Into 1 Row
I have something like this:

ID-NUMBERS
1 -123
1 -234
2 -521
3 -542
1 -432
3 -324

I would like a query that makes it into the following:
ID-NUMBERS
1 -123, 234, 432
2 -521
3 -542, 324

Is this even possible?
I would be easy if there was some kind of group by function for this.

View Replies !
Column Data Not Found
i am having this problem where my html form/php handler are not inserting the correct values into the database. I am trying to simply insert a row into a database using the same php code that i always do. could it be the different mysql structure that i am using? when i click the submit button on the page it inserts a row with all 0s. (-|-|0|0|0.00).

sql structure is as followed. i have never set up my own table with integer fields..

CREATE TABLE `mytable` (
`id` bigint(20) NOT NULL auto_increment,
`date` varchar(100) NOT NULL,
`amt_sold` smallint(5) NOT NULL,
`amt_rem` smallint(5) NOT NULL,
`raised` decimal(8,2) NOT NULL,
KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

View Replies !
Getting Data From Two Tables In One Column
I have 3 tables, as follows:
keywords: id, name
glossary: id, term, definition
synonyms: id, synonym, glossary_id

synonyms contains synonyms of the terms in my glossary. Keywords contains a list of keywords that we use throughout the site.

What I need is to have a list of my keywords, and then have a list of any synonyms and glossary terms that match or are related to those keywords.

So, basically, if keywords had 'cap', and glossary had 'hat' with a synonym of 'cap', my list needs to contain both 'cap' and 'hat'. Or, if my keywords and glossary had 'cap', and I had a synonym of 'hat', I still need both 'cap' and 'hat'.

View Replies !
Transfer DB
I have been working with a mySql database on my laptop. It is now time to transfer it to my web host's server. I tried using WS_FTP PRO (entering the mySql server address, ID, Password, and port number) but am getting the message "Connection closed by remote host."
My web host then suggested that I deselect passive mode but I get the same results. My web host then told me to use mySql Administrator. However, this utility doesn't support Windows 98 which is what I have on the PC that connects to the internet.
Please suggest something that is simple, easy, and not too expensive. Whatever I use will be suggested to my customer (who is not a programmer).

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved