Search results

  1. D

    Update joined table

    Thanks, works a treat! FYI, the postcodes database is not actully being dynamically used on the website because it contains almost 2 million records. I'm joining all the necessary data into one small database so as to reduce processing upon user request... Thanks again.
  2. D

    Update joined table

    Hi, I'm trying the following query but getting a 'Missing Operator' error before the 'FROM' when it's saved. The table 'Shops' contains a load of shops - each with a postcode. The Postcode_a table contains a list of postcodes which have Northing and Easting values. I need to pull the...
  3. D

    IIF in WHERE???

    Thanks very much EMP! It was the syntax I was struggling with (erm... mostly). I should be able to do what I'm wanting now. You're a life saver!
  4. D

    IIF in WHERE???

    Hey, I seem to be having little joy with my previous detailed posting, so I'll try something a bit more concise... Can I put an iif statement in a 'where' clause, such that if a value is passed into a query from an ASP page it can dynamically decide what to include within the 'where' clause...
  5. D

    Change WHERE criteria depending on incoming variable

    Okay, thanks, that's that bit sorted. You'll need to bear with me as I am but a novice. :rolleyes: I still have no idea how to put conditional clauses into a SQL select. I've read up about it on some sites, but to be honest nothing is making too much sense. I think it might be something...
  6. D

    Change WHERE criteria depending on incoming variable

    Okay, this is a really tricky one... I have a table containing shop names and various 'check-box' attributes such as 'SellsClothing', 'SellsBooks', 'SellsFood', etc. I have an ASP page requesting particular shops according to these criteria. Variable criteria are passed into the query from...
  7. D

    Complex ORDER BY clause doesn't work

    So does this mean I have to ask the query to do the calculation twice - once to return the records, and once to return the count? Also, does anyone know how to get the count results back into the asp page? Forgive my lack of knowledge, I've got very little experience with SQL and queries...
  8. D

    Complex ORDER BY clause doesn't work

    Hi, just wondering if anyone can help me. I need to do a calculation within a query using values supplied from an ASP page, then return the results ordered by the output of that calculation (make sense??). The query is as follows: SELECT (([Easting]^2)+([Northing]^2)^0.5) AS...
  9. D

    updating rows values using second table

    Done it. Needed a join in there... oh, and some correct syntax of course. Silly me (?)
  10. D

    updating rows values using second table

    Hi there, just wondering if anyone could help me. I'm *definitely* going to be buying a bit fat 'Access for retards' book soon - but in the meantime, please bear with me... I have been given an old table containing a load of shop names, each with a unique index, and a field called 'ShopType'...
  11. D

    Novice needs help...

    Fantastic! Thanks. One last thing... Can I get the CalculationResult back into the asp page? If so how? I tried just pulling it in as part of the recordset along with all of the other data from the table: rs("Easting") - fine rs("Northing") - fine rs("CalculationResult") - This just causes...
  12. D

    Novice needs help...

    Okay, after a whole days Googling I'm nearly there. I've got the values to be passed in with ADO, and my query looks like this: SELECT (([Easting]^2)+([Northing]^2)^0.5) AS CalculationResult, * FROM Shops WHERE (Easting>=[EastingMin_IN] AND Easting<=[EastingMax_IN] AND...
  13. D

    Novice needs help...

    Hmmm, I'm getting lost now... I don't know if you can shed a bit of light on this, but I was hoping that I could pass the variable values into the query from an ASP web page. I did this a few years ago with a SQL stored procedure (not that I can even vaguely remember how!) Is this possible...
  14. D

    Novice needs help...

    For the Easting and Northing WHERE clause, I'll need to say something like the following (not sure how to write a variable which is being passed into the query, but it's something like @ValueBeingPassedIn, so I'll use the '@' sign to try and get this accross): SELECT * FROM Shops WHERE...
  15. D

    Novice needs help...

    I think I need something along the lines of: SELECT * FROM Shops WHERE .....easting & northing within range, ((Easting^2)+(Northing^2)^0.5) AS CalculationResult, ORDER BY CalculationResult; The syntax here is crap (I'm not very familiar with SQL queries), and it obviously doesn't work. Still...
  16. D

    Novice needs help...

    Hi, just wondering if anyone could help with the following: I have an access table with three columns: shops(1), and their easting(2) and northing(3) Ordnance Survey grid references. I need to write a query which selects all shops within certain grid grid reference ranges (fine) but then...
  17. D

    use data from one table to populate another

    Thanks for your help guys. I was indeed needing a 'one-off' insert into the shops table. The reason I don't do it dynamically by joins, is that it is due to be a web application and I'm trying to cut down on processing (there is a sh*t load of data. I wrote a simple application which has done...
  18. D

    use data from one table to populate another

    Hi, just wondering if anyone could help... I have a table containing details of shops together with their postcodes and two blank columns - one for an easting grid reference, one for a northing grid reference. I also have a table conatining lots of postcodes with their easting and northing...
Back
Top Bottom