pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feederror...what to do?
3+ messages / 3 participants
[nested] [flat]
* error...what to do?
@ 2002-10-12 13:17 George <beckergb@pacbell.net>
2002-10-18 17:53 ` Re: error...what to do? Andrew Perrin <clists@perrin.socsci.unc.edu>
2002-10-18 17:59 ` Re: error...what to do? Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 2 replies; 3+ messages in thread
From: George @ 2002-10-12 13:17 UTC (permalink / raw)
To: pgsql-sql
The I am trying to do a set difference query. The query question is as
follows: 3.Find the names and costs of all abilities that Zidane can
learn,
but that Steiner cannot. Can anyone help with this ..please.
The tables to use are as follows:
beckerbalab2=> select * from ffix_ability;
ability_name | ability_description |
type | cost
----------------------+------------------------------------------------+
------------+------
Flee | Escape from battle with high probability. |
Active | 0
Cure | Restores HP of single/multiple. |
Active | 6
Power Break | Reduces the enemy's attack power. |
Active | 8
Thunder Slash | Causes Thunder damage to the enemy. |
Active | 24
Auto-Haste | Automatically casts Haste in battle. |
Passive | 9
Counter | Counterattacks when physically attacked. |
Passive | 8
MP+20% | Increases MP by 20% |
Passive | 8
Thievery | Deals physical damage to the target |
Active | 8
Fire | Causes Fire damage to single/multiple targets. |
Active | 6
Flare | Causes Non-Elemental damage. |
Active | 40
Leviathan | Causes water damage to all enemies. |
Active | 42
beckerbalab2=> select * from ffix_can_wear;
character_name | equipment_name
----------------+----------------------
Dagger | Rod
Dagger | Aquamarine
Zidane | Aquamarine
Vivi | Aquamarine
Steiner | Diamond Sword
Steiner | Ragnarok
Dagger | Running Shoes
Zidane | Running Shoes
Vivi | Running Shoes
Steiner | Running Shoes
Dagger | Ritual Hat
Zidane | Ritual Hat
Vivi | Ritual Hat
Dagger | Angel Earrings
Zidane | Dagger
Zidane | The Tower
Dagger | Leather Hat
Zidane | Leather Hat
Vivi | Leather Hat
Vivi | Black Robe
Steiner | Aquamarine
(21 rows)
beckerbalab2=> SELECT ffix_ability.name, ffix_ability.cost
beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
beckerbalab2-> WHERE ffix_can_learn.character_name = 'Zidane'
beckerbalab2-> EXCEPT --this is the difference operator hope it works
beckerbalab2-> SELECT ffix_ability.name, ffix_ability.cost
beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
beckerbalab2-> WHERE ffix_can_learn.character_name = 'Steiner';
ERROR: No such attribute or function 'name'
beckerbalab2=>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: error...what to do?
2002-10-12 13:17 error...what to do? George <beckergb@pacbell.net>
@ 2002-10-18 17:53 ` Andrew Perrin <clists@perrin.socsci.unc.edu>
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Perrin @ 2002-10-18 17:53 UTC (permalink / raw)
To: George <beckergb@pacbell.net>; +Cc: pgsql-sql
Read the error text:
> beckerbalab2=> SELECT ffix_ability.name, ffix_ability.cost
^^^^^
> beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
> beckerbalab2-> WHERE ffix_can_learn.character_name = 'Zidane'
> beckerbalab2-> EXCEPT --this is the difference operator hope it works
> beckerbalab2-> SELECT ffix_ability.name, ffix_ability.cost
> beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
> beckerbalab2-> WHERE ffix_can_learn.character_name = 'Steiner';
> ERROR: No such attribute or function 'name'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Your ffix_ability table contains the columns
"ability_name",'ability_description","type", and "cost". There's no
column called "name".
Try again with the line above as SELECT ffix_ability.ability_name....
ap
----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists@perrin.socsci.unc.edu * andrew_perrin (at) unc.edu
On Sat, 12 Oct 2002, George wrote:
> The I am trying to do a set difference query. The query question is as
> follows: 3.Find the names and costs of all abilities that Zidane can
> learn,
>
> but that Steiner cannot. Can anyone help with this ..please.
>
>
>
> The tables to use are as follows:
>
> beckerbalab2=> select * from ffix_ability;
>
> ability_name | ability_description |
> type | cost
>
> ----------------------+------------------------------------------------+
> ------------+------
>
> Flee | Escape from battle with high probability. |
> Active | 0
>
> Cure | Restores HP of single/multiple. |
> Active | 6
>
> Power Break | Reduces the enemy's attack power. |
> Active | 8
>
> Thunder Slash | Causes Thunder damage to the enemy. |
> Active | 24
>
> Auto-Haste | Automatically casts Haste in battle. |
> Passive | 9
>
> Counter | Counterattacks when physically attacked. |
> Passive | 8
>
> MP+20% | Increases MP by 20% |
> Passive | 8
>
> Thievery | Deals physical damage to the target |
> Active | 8
>
> Fire | Causes Fire damage to single/multiple targets. |
> Active | 6
>
> Flare | Causes Non-Elemental damage. |
> Active | 40
>
> Leviathan | Causes water damage to all enemies. |
> Active | 42
>
>
>
> beckerbalab2=> select * from ffix_can_wear;
>
> character_name | equipment_name
>
> ----------------+----------------------
>
> Dagger | Rod
>
> Dagger | Aquamarine
>
> Zidane | Aquamarine
>
> Vivi | Aquamarine
>
> Steiner | Diamond Sword
>
> Steiner | Ragnarok
>
> Dagger | Running Shoes
>
> Zidane | Running Shoes
>
> Vivi | Running Shoes
>
> Steiner | Running Shoes
>
> Dagger | Ritual Hat
>
> Zidane | Ritual Hat
>
> Vivi | Ritual Hat
>
> Dagger | Angel Earrings
>
> Zidane | Dagger
>
> Zidane | The Tower
>
> Dagger | Leather Hat
>
> Zidane | Leather Hat
>
> Vivi | Leather Hat
>
> Vivi | Black Robe
>
> Steiner | Aquamarine
>
> (21 rows)
>
>
>
> beckerbalab2=> SELECT ffix_ability.name, ffix_ability.cost
>
> beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
>
> beckerbalab2-> WHERE ffix_can_learn.character_name = 'Zidane'
>
> beckerbalab2-> EXCEPT --this is the difference operator hope it works
>
> beckerbalab2-> SELECT ffix_ability.name, ffix_ability.cost
>
> beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
>
> beckerbalab2-> WHERE ffix_can_learn.character_name = 'Steiner';
>
> ERROR: No such attribute or function 'name'
>
> beckerbalab2=>
>
>
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: error...what to do?
2002-10-12 13:17 error...what to do? George <beckergb@pacbell.net>
@ 2002-10-18 17:59 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
1 sibling, 0 replies; 3+ messages in thread
From: Stephan Szabo @ 2002-10-18 17:59 UTC (permalink / raw)
To: George <beckergb@pacbell.net>; +Cc: pgsql-sql
On Sat, 12 Oct 2002, George wrote:
> beckerbalab2=> select * from ffix_ability;
>
> ability_name | ability_description |
> type | cost
> beckerbalab2=> SELECT ffix_ability.name, ffix_ability.cost
^^ ffix_ability.ability_name, right? Same below.
>
> beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
>
> beckerbalab2-> WHERE ffix_can_learn.character_name = 'Zidane'
>
> beckerbalab2-> EXCEPT --this is the difference operator hope it works
>
> beckerbalab2-> SELECT ffix_ability.name, ffix_ability.cost
>
> beckerbalab2-> FROM ffix_can_learn NATURAL JOIN ffix_ability
>
> beckerbalab2-> WHERE ffix_can_learn.character_name = 'Steiner';
>
> ERROR: No such attribute or function 'name'
>
> beckerbalab2=>
>
>
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-10-18 17:59 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-12 13:17 error...what to do? George <beckergb@pacbell.net>
2002-10-18 17:53 ` Andrew Perrin <clists@perrin.socsci.unc.edu>
2002-10-18 17:59 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox