select strawberry from pancakes select pancake_number, pancake_name from pancakes where strawberry
SQLSQL
Page 1 of 1
13 Replies - 963 Views - Last Post: 30 September 2009 - 12:18 PM
#1
SQL
Posted 29 September 2009 - 07:59 PM
Replies To: SQL
#2
Re: SQL
Posted 29 September 2009 - 11:13 PM
pomak, on 29 Sep, 2009 - 06:59 PM, said:
select strawberry from pancakes select pancake_number, pancake_name from pancakes where strawberry
Could you please give a screenshot of your database so i can see what to select and where from etc.
#3
Re: SQL
Posted 29 September 2009 - 11:15 PM
#4
#5
Re: SQL
Posted 30 September 2009 - 07:20 AM
#6
Re: SQL
Posted 30 September 2009 - 07:34 AM
the select statement you were given should have worked with out issue.
Also give us the Design of your table(s) so that we can better know what we are dealing with.
#7
Re: SQL
Posted 30 September 2009 - 07:44 AM
rgfirefly24, on 30 Sep, 2009 - 06:34 AM, said:
the select statement you were given should have worked with out issue.
Also give us the Design of your table(s) so that we can better know what we are dealing with.
This is what I tried
select pancake_number,pancake_name
from pancakes
where *pancake_description*='strawberry';
PANCAKE_NUMBER PANCAKE_NAME PANCAKE_DESCRIPTION PANCAKE_PRICE
1 Pancake Around the Clock Incredibly large moist buttermilk pancakes this one makes the world go round. 6.5
6 Tropical Awareness pineapple and coconut pancakes 6.95
9 Pancake Delight cherries, coconut, raisin, need i say more 7.5
10 Fruit Integration loaded with apple, blueberry and cranberry 6.95
13 Strawberry Consciousness luscious fresh strawberry pancakes (cooked in or topped with) 6.95
14 Maine Delicacy whole grain and blueberry pancakes 6.95
18 Desperately Healthy Pancakes oatmeal and raisin buttermilk pancakes, pancakes at their best 6.95
21 Milky Way loads of chocolate chips make this luscious treat 7.95
22 Heavenly Celestial Body white chocolate chips and almond pancakes 7.95
28 Apple Orchard apple, cinnamon, walnut, cranberry and raisin pancakes 7.5
29 Strawberry Banana Pancakes strawberries and bananas make this a gourmet delight 6.75
33 Triple Chocolate chocolate batter chocolate chunks, and topped with chocolate syrup 8.5
34 Oatmeal Flapjacks chocolate chips in the batter with fresh strawberries and banana on top 8.5
35 Red, White, and Blue Pancakes strawberry banana and blueberry 8.5
36 Fancy Dark Cherries Chocolate Chips Pancakes cherries and chocolate chips 8.5
2 California Craze Outrageous raisin pancakes. 6.5
3 Banana Euphoria bananas, bananas, bananas, in every bite 6.95
4 Yankee Peddler pancakes oozing with ripe blueberries 7.5
5 Pancake Vision raisins, cinnamon, giant apple and nuts fill these beauties 7.5
7 Cherry Treat large luscious, pancakes, loaded with dark bing cherries 6.95
8 Do It Again a combination of blue berries and bananas, you'll definitely come for them again 6.95
11 Polynesian Special bananas, pineapples and coconut 8.5
12 Strawberry, banana and Chocolate Chip strawberry, chocolate chips and banana 6.95
15 English Treasure whole wheat raisin pancakes 6.95
16 Massachusetts Nut hazelnut and raisin pancakes 6.95
17 Enzyme Special papaya and pineapple, this is new 6.95
19 Summertime harvest special raised buckwheat, raisin and spice pancakes (4 medium) 6.95
20 Chocolate Lovers batter liberally mixed with rich milk chocolate chunks 7.95
23 Addictive Delight chocolate chips and peanut butter chips pancakes 7.95
24 Great Cocoa natural cocoa and peanut butter chips you'll love them 7.95
25 Edge of the Garden assorted berries make these the taste of the century 7.5
26 Strawberry Pineapple Pancakes a perfect mixture of strawberries and pineapple a favorite 6.95
27 Peaches, Banana and Strawberry Pancakes bananas, peaches and strawberry 6.95
30 Health Nut Pancakes oat bran raisins and nuts mixed in our buttermilk pancakes 6.95
31 Halloween Feast pumpkin and spice pancakes 6.95
32 Combination of the best maple, peaches and walnut pancakes 7.5
37 Banana and Chocolate Chips Pancakes banana and chocolate chips 8.5
38 White Chocolate, Banana and Almond Pancakes chocolate, banana and alnond 8
#8
Re: SQL
Posted 30 September 2009 - 07:57 AM
pomak, on 30 Sep, 2009 - 01:44 PM, said:
from pancakes
where *pancake_description*='strawberry';
you were almost right:
select pancake_number,pancake_name from pancakes where pancake_description='strawberry';
The stars were to denote you needed to do something and not type as it was. Also if your field names are in uppercase some database servers require your sql to have the field names in uppercase.
EDIT: Looking back over your reply, that might not quite fit your needs. If i understand this correctly you want the results containing strawberry so you would need to use Like
select pancake_number,pancake_name from pancakes where pancake_description Like '*strawberry*';
More info: http://www.sql-tutor...et/SQL-LIKE.asp
This post has been edited by danny_kay1710: 30 September 2009 - 08:01 AM
#9
Re: SQL
Posted 30 September 2009 - 08:07 AM
danny_kay1710, on 30 Sep, 2009 - 06:57 AM, said:
pomak, on 30 Sep, 2009 - 01:44 PM, said:
from pancakes
where *pancake_description*='strawberry';
you were almost right:
select pancake_number,pancake_name from pancakes where pancake_description='strawberry';
The stars were to denote you needed to do something and not type as it was. Also if your field names are in uppercase some database servers require your sql to have the field names in uppercase.
EDIT: Looking back over your reply, that might not quite fit your needs. If i understand this correctly you want the results containing strawberry so you would need to use Like
select pancake_number,pancake_name from pancakes where pancake_description Like '*strawberry*';
More info: http://www.sql-tutor...et/SQL-LIKE.asp
Now it is telling me this: no data found
#10
Re: SQL
Posted 30 September 2009 - 10:53 AM
#11
Re: SQL
Posted 30 September 2009 - 11:06 AM
Try this:
select pancake_number, pancake_name from pancakes where lower(pancake_description) like '%strawberry%' or lower(pancake_name) like '%strawberry%'
#12
Re: SQL
Posted 30 September 2009 - 11:31 AM
#13
Re: SQL
Posted 30 September 2009 - 12:03 PM
pomak, on 30 Sep, 2009 - 12:31 PM, said:
pomak, on 30 Sep, 2009 - 08:20 AM, said:
Your SQL Server throws Oracle errors at you? You may have bigger problems.
This post has been edited by baavgai: 30 September 2009 - 12:03 PM
#14
Re: SQL
Posted 30 September 2009 - 12:18 PM
baavgai, on 30 Sep, 2009 - 11:03 AM, said:
Sorry very much I am not using SQL I am using Oracle iLearning Academy it is web based server or something like that
I am not so familiar with Oracle or SQL I started like 3 weeks ago I paid for this so I can create tables,query and practice code it is self learning program
I want to be more educated about Oracle
Sorry again
|
|

New Topic/Question
Reply




MultiQuote








|