Jump to content

beechy34

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About beechy34

  • Rank
    Newbie
  1. beechy34

    Sql Queries

    hi im looking at some exam examples and i just want to know if im doing it right, here it is.1. Assume Sales is a relational table with schemaSales(year, month, city, category, customers, units)that contains aggregate data such as the number of customers and the units sold of a given product category at a particular month and year. Write SQL queries that make use of Oracle 10g analytical functions to answer the following questions:a) Rank the sales data (in descending order) per city according to units sold.] Rank the sales data (in ascending order) per year and month, according to the number
  2. beechy34

    Php

    i does any one know how to get a drop down list to read something straight from an sql database. this is what someone has asked me to do in their words"i need the drop down list with the cars listed to read the cars straight from my database"can you helpthankyou
  3. hi this is my code for phone number if (ereg("(^[0-9]{6,6})$", $phone)){echo "$phone";} what i would have to be done to allow whitespace in between the numbersthankyou
  4. beechy34

    Remove Whitespace

    i know that \S allows white space how would you remove white space like for a phone number because some phone numbers have spaces in between them, what i want to do is is remove the white space so that the number goes together as a whole.thankyou
  5. beechy34

    Form

    yeah i found it this is what the code looks like if any one wants it. <INPUT TYPE="radio" NAME="PROPTYPE" Value="Freehold" <?php if ($_POST['PROPTYPE'] == 'Freehold') {echo 'checked="checked"';} ?>
  6. beechy34

    Form

    how would that work for a radio buttonhere is the code i have i tried the same way as the option but it didnt work. <INPUT TYPE="radio" NAME="PROPTYPE" Value="Freehold" > please help thankyou
  7. beechy34

    Form

    hi what i have done is created a form with data validation i have put form in the php file as well so it can tell if i have put say number where test should be in name, so if put a number it will show up with an error message by the text field and if the data in the text field is correct then the data will stay there here is the code for what i have done if you dont know what i am getting at:- Telephone:<br><input type="text" size=40 name="TELEPHONE" value= "<?php echo $phone; ?>"><br> what i would like to know is how would i do that for an option box, here is an exam
  8. oh right cool how do you allow for spaces?
  9. hi this is what i have done for name so far if (ereg("(^[a-zA-Z])", $nme)){echo $nme;} what i want to be able allow is the name o'conner and other names like thatcan you help thankyou
  10. ok i tried it and had to change it a little to make give me an out put this is the code SELECT((SELECT COUNT(TOAC) FROM TELCO_CALLS WHERE TOAC LIKE '01%') -(SELECT COUNT(TOAC) FROM TELCO_CALLS WHERE TOAC not LIKE '01%')) as beechfrom TELCO_CALLS; the problem now is that it gives me 50 rows with each row showing the value of 30, all i want it 1 row showing the value of 30.can you or someone helpthankyou
  11. this is my code SELECT *from (SELECT COUNT(TOAC)as "callsNormNumbers" FROM TELCO_CALLS WHERE TOAC LIKE '01%') - (SELECT COUNT(TOAC)as "callsNormNumbers" FROM TELCO_CALLS WHERE TOAC not LIKE '01%'); this code is supposed to take away the total of all numbers that start with 01 from the TOAC column from the total of all the numbers that do not start with 01 from the same coumn, but it doesnt seem to work can someone help methankyou
  12. beechy34

    Union

    cheers dude, youve really helped me out there.thankyou
  13. beechy34

    Union

    ok i figured out how to do what i wanted but there is another problem here is the code and this is the outputCOUNT(A1.TOAC) COUNT(A2.TOAC) ---------------------- ---------------------- 400 400 the problem is the number should say 10 and then 40 can any one tell me how to make it work.thankyou
  14. beechy34

    Union

    ok what you just told me worked but without the alias so it looks like this now and works but not the way i want. and here is the outputCOUNT(TOAC) ---------------------- 10 40but this is how i want it to look COUNT(TOAC) COUNT(TOAC) ------------------------------------- 10 40 something like that do you get methankyou
  15. beechy34

    Union

    hi can any one help me i have a table that shows phone calls and one of the colums is called TOAC where it has the area codes of the numbers that have been called to.what i am tring to do is to make a query that shows the total amount of all the special service numbers in one column and then in another column would have the total of all the normal numbers. ive managed to get it to do everything i want but i cant get them to go into different columns they are both in the same one.this is what my code looks like select * from(select COUNT(TOAC) as "beech" from TELCO_CALLSwhere TOAC Like '01%'u
×
×
  • Create New...