Search results

  1. D

    Beginner: Many-to-many relationship

    Hi, I have two tables, one contains a list of universities - it has two columns: 'Id' (the primary key) and 'UniversityName'; the other has a list of degree qualifications (e.g. MSc physics, BSc geology, MA fine art) - it has two columns: 'Id' (the primary key) and 'QualificatoinName'. I want...
  2. D

    Insert blank record into number field

    Thanks, I've not even heard of that - let alone konw how to use it! I actually sorted the problem out now by building my SQL command string from a series of vbscript conditionals. That way, if the incoming value of AgeMin has defaulted to zero, I just leave the UPDATE AgeMin out of the SQL...
  3. D

    Insert blank record into number field

    Hi, I have an SQL insert statement which inserts AgeMin and AgeMax into two different database columns. I'd like this to allow blank entries, but it doesn't seem to work - even though I have the database set up to allow blank values?? Any ideas? Thanks.
  4. D

    SELECT all data WHERE one column is DISTINCT

    Actually, the GROUP BY hasn't sorted it. The columns I have are: Id, Title, Description, Manufacturer, Price Some of the products have the same title but different manufacturer. Basically, I need to return all of the data for a web listing, but only those whose titles are unique. The...
  5. D

    SELECT all data WHERE one column is DISTINCT

    No, sorry if that didn't make sense. What I wanted to achieve is quite simple, return all data from a database, but only where the values in the 'Title' column are distinct. I've done it using GROUP BY which seems to be quite a long-winded way but the only way I can find. Thanks.
  6. D

    SELECT all data WHERE one column is DISTINCT

    Hi, I have a database with lots of rows. I want to return all data but only with a distinct "Title" value. I've tried: SELECT DISTINCT Title, * FROM etc etc... But that doesn't seem to work. Any help would be greatly appreciated, thanks.
  7. D

    Update set where like not working

    Ah ha! Thanks Mile-O-Phile. I've been looking at Pat Hartman's Many-to-Many example to try to do it 'properly' like you suggest, but it really makes no sense. As you can tell, my Access skills are really poor. I've never dealt with Forms (don't even know what they're used for) and queries...
  8. D

    Update set where like not working

    Back to the original question, it seems to be the percentage sign wihich is causing the problems. This works (returns lots of updated results): UPDATE product SET IsOS95 = -1 WHERE OperatingSystem LIKE '95/98/2000'; But this doesn't (can't find an records to update): UPDATE product SET...
  9. D

    Update set where like not working

    Thinking about it, by changing the structure of the database, I'm still left with the same problem. How to update the current OperatingSystem field so that it is more accessibly structured (for web searching etc) automatically. Going through each of the 5000+ records by hand isn't an option.
  10. D

    Update set where like not working

    There are over 5000 records in the database, so I'm concerned that joins will cause a larger system overhead than simple check-boxes. I can add 'Longhorn' to the table when it comes out in 2007 without much headache. It's not like a new OS is released daily... I see what you're saying and...
  11. D

    Update set where like not working

    And to have multiple operating systems selected?
  12. D

    Update set where like not working

    Oops, that's just a typo - the table name is in query, it should read: UPDATE product SET IsOS95 = -1 WHERE OperatingSystem LIKE '95'; Thanks for the advice Mile-O-Phile, I'm aware of table joins, but the database has to be maintained by a *total* novice - so check-boxes are best in this...
  13. D

    Update set where like not working

    Hi, Probably a very simple problem to fix but I can't seem to get it working. I have a table with a text column called 'OperatingSystem' - containing data like this: 95/98/2000/XP I also have some Yes/No columns called IsOS95, IsOS98, IsOS2000 etc. I'm looking to tick the appropriate yes/no...
  14. D

    Split AgeRange col to AgeMin & AgeMax

    Excellent! Thanks very much!!
  15. D

    Split AgeRange col to AgeMin & AgeMax

    Hi, Maybe someone can help... I have a database which contains a column called AgeRange, which holds values such as 11 - 14, 7, 4 - 18, etc. Is there a T-SQL query I could run to split this data into two new columns called AgeMin and AgeMax - using the hyphen as the divider? There are...
  16. D

    Syntax error in UPDATE statement

    By jove, that's done it! Thanks very much... I shall beware of that one!
  17. D

    Syntax error in UPDATE statement

    Right, yeah, it's not actually hard-coded in my real page. I'll explain: I'm building a feature for inputting classified adverts for second-hand vehicles. A user needs to input their details, which will be written to a database alongside an expiry date (calculated as being 14 days from the...
  18. D

    Syntax error in UPDATE statement

    Hi, this has to be really really simple... I get a 'Syntax error in UPDATE statement' error when executing the code below to update my Access database: UPDATE Advert SET IsActive = -1, Date = #17/02/2004# WHERE AdvertId=" & iAdvertId Any ideas?? Thanks.
  19. D

    Surely this must be easy?

    Anyone know how to select only distinct names from the following table, taking only the name with the most recent year of birth: Id Name YearOfBirth 1 Bob 1979 2 Barry 1945 3...
  20. D

    How to run mailing list on different server

    Just wondering if anyone could offer some assistance... My client has a 'Fasthosts' reseller account, and are developing a site which contains a relatively small - and very legitimate I might add - mailing list of roughly 200 addresses. All email content is built dynamically with ASP and...
Back
Top Bottom