Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6680909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:31:48+00:00 2026-05-26T04:31:48+00:00

Here’s the data: CREATE TABLE `Charlies_Sierra_Papa` ( `Mike` int(5) default NULL, `cpf` char(11) default

  • 0

Here’s the data:

CREATE TABLE `Charlies_Sierra_Papa` (
  `Mike` int(5) default NULL,
  `cpf` char(11) default NULL,
  `idFoxtrot` int(3) default NULL,

) ENGINE=MyISAM AUTO_INCREMENT=254098 DEFAULT CHARSET=utf8;

INSERT INTO `Charlies_Sierra_Papa` VALUES ('1', '12345678910', '12');
INSERT INTO `Charlies_Sierra_Papa` VALUES ('2', '11121314157', '12');
INSERT INTO `Charlies_Sierra_Papa` VALUES ('3', '57585960610', '12');


CREATE TABLE `Charlies` (
  `idCharlie` int(20) NOT NULL auto_increment,
  `cpf` varchar(11) NOT NULL default ''
  PRIMARY KEY  (`idCharlie`),
  UNIQUE KEY `cpf` (`cpf`),
  UNIQUE KEY `idCharlie` (`idCharlie`),
) ENGINE=MyISAM AUTO_INCREMENT=264670 DEFAULT CHARSET=latin1;

INSERT INTO `Charlies` VALUES ('1', '12345678910');
INSERT INTO `Charlies` VALUES ('2', '11121314157');
INSERT INTO `Charlies` VALUES ('3', '57585960610');


CREATE TABLE `Mike` (
  `Mike` int(5) unsigned zerofill NOT NULL auto_increment,
  `idCharlie` int(11) NOT NULL default '0',
  PRIMARY KEY  (`Mike`),
  UNIQUE KEY `idCharlie` (`idCharlie`)
) ENGINE=MyISAM AUTO_INCREMENT=12043 DEFAULT CHARSET=latin1;

INSERT INTO `Mike` VALUES ('00001', '51214');
INSERT INTO `Mike` VALUES ('00002', '174135');
INSERT INTO `Mike` VALUES ('00003', '203553');

And here are the SELECT and the UPDATE:

UPDATE Charlies_Sierra_Papa AS csp, Charlies AS Cha, Mike_oc AS Mik
SET csp.cpf = cast(Cha.cpf AS char(11))
WHERE csp.cpf = Cha.cpf
AND Cha.idCharlie = Mik.idCharlie
AND csp.Mike = Mik.Mike
AND csp.idFoxtrot = 16 


SELECT * FROM Charlies_Sierra_Papa AS csp, Charlies AS Cha, Mike_oc AS Mik
/*SET csp.cpf = cast(Cha.cpf AS char(11))*/
WHERE csp.cpf = Cha.cpf
AND Cha.idCharlie = Mik.idCharlie
AND csp.Mike = Mik.Mike
AND csp.idFoxtrot = 16 

my problem is: the SELECT returns the expected values, but the UPDATE gives me an annoying “Affected rows: 0” when I run it.

Any clues?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:31:48+00:00Added an answer on May 26, 2026 at 4:31 am

    It’s a trivial error:

    I’m trying to UPDATE csp.cpf = Cha.cpf
    but I’m also tying csp.cpf = Cha.cpf
    so, no rows updated and no cigar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote
Here is a table CarID| Attribute | Value 1 | Color | Red 2
Here's my procedure: DROP PROCEDURE IF EXISTS `couponExpires`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `couponExpires`(IN couponID BIGINT,
Here is my problem : I have a post controller with the action create.
Here is an example. foreach (var doc in documents) { var processor = this.factory.Create();
Here is my problem. Our tech. writer or customer service will often create new
Here is my simplified data structure: Object1.h template <class T> class Object1 { private:
here is the scenario 1: user starts to type some word, autocomplete engine shows
Here's an example query: DECLARE @table table (loc varchar(10)) INSERT INTO @table VALUES ('134a'),
Here's a basic regex technique that I've never managed to remember. Let's say I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.