🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1482

Re: problema join con mysql

#1482
From: Rickoj
Date: Sat, 05 Aug 2006 19:49
45 lines
2489 bytes
"Mauricio Gomez" <pregunte@sileinteresa.com> escribi� en el mensaje 
news:eb2s35$r31$1@news.nivel5.cl...
> Rick_oj escribi�:
>>
>> pero si elijo c.rut o p.rut continua entregando errores, lo que 
>> finalmente hice fue select * al final...
>
> Me piqu� :p
>
>
> mysql> select * from clientes;
> +-----+------------+-----------+----------+-----------+
> | rut | ap_paterno | ap_matern | nombres  | compra    |
> +-----+------------+-----------+----------+-----------+
> | 111 | ap1        | am1       | nombres1 |           |
> | 222 | ap2        | am2       | nombres2 | efectuada |
> +-----+------------+-----------+----------+-----------+
> 2 rows in set (0.00 sec)
>
> mysql> select * from productos;
> +-----+-------+
> | rut | items |
> +-----+-------+
> | 111 | A     |
> | 222 | B     |
> +-----+-------+
> 2 rows in set (0.00 sec)
>
> mysql> SELECT `ap_paterno`,`ap_matern`,c.`rut`,`items`
>     -> FROM clientes c join productos p
>     -> WHERE c.rut=p.rut and c.compra='efectuada';
> +------------+-----------+-----+-------+
> | ap_paterno | ap_matern | rut | items |
> +------------+-----------+-----+-------+
> | ap2        | am2       | 222 | B     |
> +------------+-----------+-----+-------+
> 1 row in set (0.00 sec)
>
> mysql>

ahi ta la madre del cordero estaba intentando con `clientes`.`rut`
claro que con la comilla rsulto sin ella arrojaba error como resultado como 
dije antes
gracias
Technical Details
Message-ID: <eb2sqa$r9m$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
References: <eb0aea$1bh$1@news.nivel5.cl> <Xns9816122D877E0jmsnews@200.27.221.71> <eb2nbs$plj$1@news.nivel5.cl> <eb2s35$r31$1@news.nivel5.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,599d380b0a5f3acc
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!not-for-mail
From: "Rick_oj" <rick_oj@[sin-esto]tutopia.com>
Newsgroups: chile.comp.programacion
Subject: Re: problema join con mysql
Date: Sat, 5 Aug 2006 15:49:23 -0400
Organization: Varios
Lines: 47
Message-ID: <eb2sqa$r9m$1@news.nivel5.cl>
References: <eb0aea$1bh$1@news.nivel5.cl> <Xns9816122D877E0jmsnews@200.27.221.71> <eb2nbs$plj$1@news.nivel5.cl> <eb2s35$r31$1@news.nivel5.cl>
NNTP-Posting-Host: pc-211-201-120-200.cm.vtr.net
X-Trace: news.nivel5.cl 1154807434 27958 200.120.201.211 (5 Aug 2006 19:50:34 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Sat, 5 Aug 2006 19:50:34 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Response