Hello,
I'm using CentOS 5.5 with PostgreSQL 8.4.7 and
am migrating my site from phpBB 3 to Drupal 7.
I would like to copy these fields from one table:
select user_id, username, user_email, user_regdate, user_lastvisit
from phpbb_users where user_id > 50;
into the other (already existing) tabl
On Wed, Mar 09, 2011 at 02:47:46PM +0100, Alexander Farber wrote:
> I would like to copy these fields from one table:
>
> select user_id, username, user_email, user_regdate, user_lastvisit
> from phpbb_users where user_id > 50;
>
> into the other (already existing) table:
>
> select uid, nam
On Mar 9, 2011, at 08:47 , Alexander Farber wrote:
> Hello,
>
> I'm using CentOS 5.5 with PostgreSQL 8.4.7 and
> am migrating my site from phpBB 3 to Drupal 7.
>
> I would like to copy these fields from one table:
>
> select user_id, username, user_email, user_regdate, user_lastvisit
> from p
Oh it is called "INSERT INTO", thank you!
I still have a problem though:
# select uid, name, mail, created, access from drupal_users;
uid | name |mail| created | access
-+--+++
0 | |
On 09/03/2011 14:21, Alexander Farber wrote:
Oh it is called "INSERT INTO", thank you!
I still have a problem though:
# select uid, name, mail, created, access from drupal_users;
uid | name |mail| created | access
-+--++
Hello Raymond and others,
thank you for looking at my problem!
It is a core Drupal 7 table, with a prefix "drupal_"
(you can set it while installing Drupal 7 in adv. options).
I have only 2 records in that target table:
# select uid, name, mail, created, access from drupal_users;
uid | name |
I've also tried renaming 'Alex' to a temp. value:
# update drupal_users set name='Alex_1972' where name='Alex';
UPDATE 1
# INSERT INTO drupal_users (uid, name, mail, created, access)
SELECT user_id, username, user_email, user_regdate, user_lastvisit
FROM phpbb_users
WHERE user_id > 50 and
Oh ok, found it:
# select one.username, one.user_id, two.user_id from phpbb_users one,
phpbb_users two where two.username=one.username and two.user_id <>
one.user_id;
username | user_id | user_id
--+-+-
Вячеслав |7564 | 421
Вячеслав | 421 |7564
(2 rows)
ay, March 09, 2011 9:21 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Copying data from one table to another - how to
specify fields?
Oh it is called "INSERT INTO", thank you!
I still have a problem though:
# select uid, name, mail, created, access from drupal_users;
-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber
Sent: Wednesday, March 09, 2011 9:48 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Copying data from one table to another - how to
specify fields?
Hello Raymond and others,
thank you for looking at
Thank you all for the replies!
On Wed, Mar 9, 2011 at 7:01 PM, David Johnston wrote:
> SELECT username, count(username) FROM phpbb_users
> GROUP BY username
> HAVING count(username) > 1;
>
> If anything shows up then (phpbb_users .username) is not a unique field but
> you are trying to insert it
11 matches
Mail list logo