Fortunately I have solved this problem. I think it was something about
being a two field composed foreign key and updating these two fields at
the same time gave some kind of error.
I solve it by adding a temporary row in the referenced table with one of
the fields already changed and then updatin
Posting you table difinitions and queries would be helpful.
Olexandr Melnyk,
http://omelnyk.net/
2007/2/8, Alicia Amadoz <[EMAIL PROTECTED]>:
Hello,
I am trying to update two fields of a table that are a composed foreign
key to another table. These fields cant
Hello.
Please, could you provide the CREATE statement for you tables
and describe the relationships between their fields (it will
be good if you include sample data as well).
Matthew Batt wrote:
> Hi
>
> I need to update the 'products_id' field (shown below) by copying data
> from
, 2005 9:26 am
Subject: Re: problem with update statement
> Hi,
> this is an example where what you describe doesn't happen (v 4.1
> and 5.0) :
> mysql> create table ports(mac varchar(17),port_index varchar(3));
> Query OK, 0 rows affected (0.10 sec)
>
> mysql> in
Hi,
this is an example where what you describe doesn't happen (v 4.1 and 5.0) :
mysql> create table ports(mac varchar(17),port_index varchar(3));
Query OK, 0 rows affected (0.10 sec)
mysql> insert into ports values('00:04:FB:23:5A:44','120'),(NULL,'120');
Query OK, 2 rows affected (0.08 sec)
Recor
That is very odd behavior and shouldn't be happening. I ran a quick
test on my machine and MySQL does not exhibit that behavior. You may
try running and repair on your table. Perhaps something is out of
whack. What version of MySQL are you running?
On Apr 22, 2005, at 6:08 PM, [EMAIL PROTECTED]
STIBS,
Thursday, October 17, 2002, 12:26:34 AM, you wrote:
S> I have a littlebig problem:
S> I want to UPDATE table1.fields with data from table2.fields WHERE the id (in this
S> case a product number) is the same in both tables.
S> OK, I did this:
S> UPDATE table1 SET table1.field1 = table2.fi
Thanx guys!
but:
I'm not in the mood to try Greg's suggestion ... LOL!
I think I'll work around that with Escapade programming language. It's much easier to
handle.
If not:
I run a script that checks record by record in the first table if an update in the
second table is available then I query
>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 16, 2002 5:15 PM
Subject: RE: Problem with UPDATE table ... can u help plz?
When I try that modified for my tables that fit this hypothetical, I get:
CREATE TABLE `sales_table` (
`item_s` varchar(100) default '',
`price_s
on the page shows a kluge
workaround.
Greg
-Original Message-
From: Bruce Lewis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 4:03 PM
To: STIBS; [EMAIL PROTECTED]
Subject: Re: Problem with UPDATE table ... can u help plz?
You need an InnerJoin to perform the operation similar
You need an InnerJoin to perform the operation similar to:
UPDATE table1 SET table1.field1 = table2.field1, table1.field2 =
table2.field2,...
INNER JOIN Table1 ON Table2.ID = Table1.ID
Bruce Lewis
- Original Message -
From: "STIBS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: We
Andis,
Friday, September 06, 2002, 12:08:58 PM, you wrote:
AG> Is it's possible to execute such query in MySQL?
AG> update table_name set table1.field1=table2.field2 where
AG> table1.key=table2.key
If you use 4.0.2 or higher yes, otherwise nope.
Pre-version of multi-table updates came only in 4
Ooops!! This seems to be a bug in EMS MySQL Manager... Sorry to bother
you all...
Regards
Peter
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: do 24 jan 2002 18:51
To: Peter Bremer; Mysql (E-mail)
Subject: Re: Problem with UPDATE and User Variables
At
At 18:32 +0100 1/24/02, Peter Bremer wrote:
>Hi,
>
>Can anybody explain why the following does not work?
>
> SELECT @variable := value1;
> UPDATE table SET field1 = @variable WHERE field2 = value2;
>
>The result is always that field1 is set to NULL...
Works for me, if I substitute a real valu
Hi,
You'll need to post your query and the error message to get a meaningful
response.
Quentin
-Original Message-
From: Prachi Shroff [mailto:[EMAIL PROTECTED]]
Sent: Monday, 29 October 2001 1:36 p.m.
To: [EMAIL PROTECTED]
Subject: problem with update
Hi all!
I am new to MySQl and am
On 10-Aug-2001 Julian Simpson wrote:
> In what way is it mangling my query?
> and why won't the same query work from my php script.
> I would accept this if it was just any interface but myphpadmin is supposed
> to be in line with mysql standards.
>
>>> update cdrequest set albumfill = "hot sho
>> In what way is it mangling my query?
>> and why won't the same query work from my php script.
>> I would accept this if it was just any interface but myphpadmin is supposed to be
>in line with mysql standards.
>>
>> >> update cdrequest set albumfill = "hot shots II", releasedatefill
>> >> =
On Fri, Aug 10, 2001 at 02:19:21AM -0400, Julian Simpson wrote:
> In what way is it mangling my query?
> and why won't the same query work from my php script.
> I would accept this if it was just any interface but myphpadmin is supposed to be in
>line with mysql standards.
>
> >> update cdreque
In what way is it mangling my query?
and why won't the same query work from my php script.
I would accept this if it was just any interface but myphpadmin is supposed to be in
line with mysql standards.
>> update cdrequest set albumfill = "hot shots II", releasedatefill
>> = 20010708 where requ
> update cdrequest set albumfill = "hot shots II", releasedatefill
> = 20010708 where requstID = 2;
>
> i get:
> You have an error in your SQL syntax near '\"hot shots II\",
> releasedatefill = 20010708 where requstID = 2' at line 1
> I can't see any reason for the error.
Your web based inte
This is no bug. This is usually a result of
1. The mysql server not starting.
2. Incorrect permissions.
3. socket file is in the wrong place and yes, you can define the location of
the socket file. RTFM for this.
- Original Message -
From: "Mark Lo" <[EMAIL PROTECTED]>
To: <[EMAIL PR
Oliver Hinds wrote:
>
> On Thu, 18 Jan 2001, Gerald L. Clark wrote:
>
> > Oliver Hinds wrote:
> > >
> > > Has anyone experienced problems using DBI and perl with update statements
> > > not updating tables when the equivalent statement at the command line
> > > works, and all other operations wo
On Thu, 18 Jan 2001, Gerald L. Clark wrote:
> Oliver Hinds wrote:
> >
> > Has anyone experienced problems using DBI and perl with update statements
> > not updating tables when the equivalent statement at the command line
> > works, and all other operations work perfectly?
> >
> > Oliver Hind
Oliver Hinds wrote:
>
> Has anyone experienced problems using DBI and perl with update statements
> not updating tables when the equivalent statement at the command line
> works, and all other operations work perfectly?
>
> Oliver Hinds
>
>
Only when I make the wrong assumption about what perl
24 matches
Mail list logo