Numerical Value
Using SQL it's easy to search for part of a string by doing the folowing:
"WHERE strText LIKE '%" & varTest & "%'"
However, is there a way of doing the same thing for a number?
My database has an autogenerated 'fault reference' number, and it has to be searchable.
View Replies
I have made a forum script and I know this is very basic stuff but how do you go about updating a number with an increment of +1.
Access Database - Two Tables - Topic and Replies.
In Topic there is a column called replies. When a user views a topic there is a reply form at the bottom which is processed by reply.asp which add the information entered to the database in the replies field. Also added is subjectid to each reply so I can link the two together.
Either I want to be able to update the reply number in the topic table by +1 in the appropriate subject row (the id is passed on to the reply page) or count the number of alike subjectid's in replies to the subject in topics. What is the best way and how do I update numbers by +1.
View Replies
View Related
I am doing a project for my HND for a football league and i am at the point where so far everything is goin good but i need to update the League table. For those that dont know how a league table works here it is:
For a Win you get 3 points
A loss u get 0
a Draw u get 1
Any goals u score go into you 'Goals for'
And any scored against you go in your 'Goals against".
Basically i already have some ASP files where the administrator of the system types in the results for games played now i need to update this league table depending on the results. I want to execute something like this:
If HomeScore is greater than AwayScore Then Add 1 to the played field, add 1 to the Wins field, add 3 to the Points field and for the goals for and against i thought it may look something like this:
For = for + "HomeScore'
Against = Against + "AwayScore"
I have absolutely no idea how to do this, i dont know whether to use an Insert statement or an update Statement.
View Replies
View Related
I am using a Relational database for my site and i have the following tables:
FIXTURES, GAMEDATES
the fields in FIXTURES are:
GameDate
Home
Away
(All of the above are numerical fields)
the fields in GAMEDATES are:
DateID(integer)
GameDate(#Date Field#)
What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)
The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:
WHERE Fixtures.GameDate<=(Date())
obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.
The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.
Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data
View Replies
View Related