User Profile

Collapse

Profile Sidebar

Collapse
ozchadl
ozchadl
Last Activity: Nov 18 '10, 10:30 PM
Joined: Apr 24 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ozchadl
    replied to Help with above average sum in Access SQL
    I have tried that code and no results were displayed.
    Thanks for your help
    See more | Go to post

    Leave a comment:


  • ozchadl
    started a topic Help with above average sum in Access SQL

    Help with above average sum in Access SQL

    I have a horse database which has the following tables:
    horse (horse_id, name, colour, sire, dam, born, died, gender)
    Showsite (show_id, name, address, suburb)
    Judge (judge_id, name, suburb)
    Event (event_id, show_id, event_name, judge_id)
    Entry (event_id, horse_id, place)
    Prize (event_id, place, money)

    I need the career winnings code to do a sum in the 'where' or 'having' so that I can find...
    See more | Go to post

  • It now works.

    The correct code is:
    If DCount("*", "horse", "Sire=" & Me.txtHorse_id. Value & " OR Dam=" & Me.txtHorse_id. Value) > 0 Then
    MsgBox "A horse can not be deleted if it is the Sire or Dam of an existing horse"
    Exit Sub
    Else
    DoCmd.DoMenuIte m acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuIte m acFormBar,...
    See more | Go to post

    Leave a comment:


  • ozchadl
    started a topic Help with Dcount mulitple criteria VBA / Access

    Help with Dcount mulitple criteria VBA / Access

    I have a horse database with the following fields:
    Horse_id
    Name
    Sire
    Dam
    Born
    Died
    Gender

    Sample Data
    -----------------
    Horse_id - 10
    Name - Black
    Sire - 20
    Dam - 30
    Born - 2000
    Died - 0
    Gender - S


    What I am trying to do is on the form (frmHorses) when you click the "rubbish bin" to delete that...
    See more | Go to post

  • Help with import data from a text file via sql into a table

    I wish to import some data I have in some (tab delited) files that I would like to import into certain tables in my access database.
    I would like to import them using SQL only.
    I know there are other ways to import the data, but I want to be able to do this with sql.

    I belive it may be an insert into statement.

    Thanks for you help.
    See more | Go to post

  • ozchadl
    started a topic Help with Delete which has a condition

    Help with Delete which has a condition

    I have an Access database.
    1 table in it is "Cats"
    The fields are:
    Catid - number
    Name - text
    Mother - number
    Father - number

    I have setup a form (frmCats) for this table.
    There is a delete button (cmdDelete)

    I wish to setup a condition, which does the following:
    a cat can not be deleted if it is the mother or father of an existing cat.

    ...
    See more | Go to post

  • ozchadl
    started a topic Help with Access SQL join 3 tables

    Help with Access SQL join 3 tables

    I need help with joining 3 tables together in Access SQL
    The tables are:
    Prizes (event_id, place, money)
    Entry (event_id, animal_id, place)
    Animal (animal_id, name,gender, born, died)


    I need to calculate the sum of the prize money won by each animal, even though an animal may not have been entered.
    That is why there is a Left Join
    I need a join to the Prize table.

    My...
    See more | Go to post

  • I have been told that a trigger can do thant.

    Thanks for your help...
    See more | Go to post

    Leave a comment:


  • I want it done by a create trigger before event.
    It is so that when new data is entered you get the error message if there is a duplicate, and a message saying that the data has been added.

    This is for a mysql database.

    Thanks for your help
    See more | Go to post

    Leave a comment:


  • ozchadl
    started a topic How to create a before insert trigger with message

    How to create a before insert trigger with message

    I am trying to create a before insert trigger for a table called "bookorder"

    Table - "bookorder"
    'order_id' contains numbers
    'book' contains numbers
    'description' contains text

    The trigger is for when there is a duplicate of order_id and book.
    If duplicate of both order_id and book then error message says "Error Duplicate order_id X Book Y"
    eg the error...
    See more | Go to post

  • ozchadl
    replied to displaying result in a single row
    I managed to get it working.
    Thanks
    See more | Go to post

    Leave a comment:


  • ozchadl
    replied to displaying result in a single row
    Could you please explain
    select distinct A.con_id as cid
    what is A


    Could you please explain
    from cont_res A
    what is A

    I know cont_res is your table name
    'animal_event_i d' would be your con_id
    'animal_place' would be your animal_id
    'animal_prize_m oney' would be your prize


    Thanks for your help
    See more | Go to post

    Leave a comment:


  • ozchadl
    replied to displaying result in a single row
    There are multiply events.
    The prize money amounts do vary

    my code is similar to what one of the replies is on
    http://forums.mysql.com/read.pho?10,301759,301767

    My question is similar to that question ask on
    http://forums.mysql.com/read.pho?10,301759,301759...
    See more | Go to post

    Leave a comment:


  • ozchadl
    started a topic top 2 places mysql

    top 2 places mysql

    I am trying to do a query in mysql which does:
    displays only the 'animalentry.an imal_id' and 'animal.name' where
    'animalentry.pl ace' = 1 or 2

    The tables and fields / columns are
    'animalentry' - table
    'animalevent_id ' - column / field
    'animalplace' - column / field


    'animal' - table
    'animal_id' - column / field
    'name' - column / field
    'year_born' - column...
    See more | Go to post

  • ozchadl
    replied to displaying result in a single row
    That code is not for what I am trying to do.

    This is my code so far:
    Select animal_event_id ,
    case when animal_place = 1 then animal_prize_mo ney else null end as first,
    case when animal_place = 2 then animal_prize_mo ney else null end as second,
    case when animal_place = 3 then animal_prize_mo ney else null end as third
    from animal_prize_mo ney;

    I want to end up with a table which is like:...
    See more | Go to post

    Leave a comment:


  • ozchadl
    replied to displaying result in a single row
    Those commands were not that helpful.
    The '1st', '2nd', and '3rd" gets the amount from 'animal_prize_m oney'.
    The '1st', '2nd', and '3rd" is from 'animal_place'.

    The result should be somehting like
    'animal_event_i d' '1st' '2nd' '3rd'
    1 30 20 10


    If the place is 1, then "1st", should say something like 30.

    If the place is 2, then...
    See more | Go to post

    Leave a comment:


  • ozchadl
    started a topic displaying result in a single row

    displaying result in a single row

    I have a table called 'animal_prize' in a Myswl database.
    The columns / fields are:
    'animal_event_i d' contains numbers such as 1
    'animal_place' contains numbers from 1 to 10
    'animal_prize_m oney' contains numbers such as 10


    I am trying to get the results so that it appears like the following:
    animal_event_id 1st 2nd 3rd
    1 30 20 10
    2 ...
    See more | Go to post

  • ozchadl
    started a topic count the number of records - stored procedure

    count the number of records - stored procedure

    I have a table called 'Animals' in a mysql database.
    The columns / fields are:
    'name'
    'animal'
    'year born'

    I am having problems creating a stored procedure called 'animalscount_s p'.

    The stored procedure is meant to count the number of records in the 'Animals' table

    Thanks for your help
    See more | Go to post

  • ozchadl
    replied to Calculating age in mysql
    I got it to finally work
    This is part of the code that I used, which works to calculate the age

    left(curdate(), 4) - (year born)
    See more | Go to post

    Leave a comment:


  • ozchadl
    replied to Calculating age in mysql
    I would prefer not to alter the field / column name and any data.
    I know that it is possible to do this age calculation in mysql.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...