Search results

  1. IntoTheVoid

    SQL Server query question - any way around this little issue?

    Try convert instead of cast: select * from (SELECT P.PolicyId , P.EffectiveDate --Check of 'Original Policy Start Date' to identify if Outpatient paragraph should be applied or not ,CASE WHEN CONVERT(CHAR(8), CONVERT(Date, pa.PolicyAttributeValue, 112) <...
  2. IntoTheVoid

    US: Manhattan

    You can buy it on Amazon Video
  3. IntoTheVoid

    Access Report Sum Totals based on another column

    In the end I created two calculated fields in the underlying table using Iif statements. I then created two textboxes in the report group footer for budget code and used these to sum and display the totals.
  4. IntoTheVoid

    Access Report Sum Totals based on another column

    Hi, I am stuck on an MS Access 2010 report. I have the report grouped by a budget code. There is a column for total number of jobs and a column for the job type. I want to sub total the total number of jobs based on job type. So for example if the job type is skilled then create a sub total...
  5. IntoTheVoid

    PHP and PDO

    Here are a few I found helpful recently: http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access--net-12059 http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers I started to use PDO initially as I was fed up with messy looking SQL strings, but soon found...
  6. IntoTheVoid

    PDO Prepared Statement problem

    Hi, I have solved the problem. I forgot to check the server request method. I enclosed everything in: if ($_SERVER["REQUEST_METHOD"]=="GET") { } and it works fine now. Funny how the other queries worked without it though!!!!
  7. IntoTheVoid

    PDO Prepared Statement problem

    Hi, I have a weird problem. I am using PDO prepared statements against an MySQL database. When I use named parameters the results return fine, however I have one condition that if the string "all" is passed in as the GET value then the prepared statement should select all from the table. This...
  8. IntoTheVoid

    SQL Average Number of Items per Order Query!!!

    I can understand what is happening now, thanks for the insight. It is frustrating that SQL Server can get the same job done with simpler syntax i.e this works for me and the CAST function gives me the result without rounding down: SELECT CAST(COUNT(OrderItems) AS FLOAT) / COUNT(DISTINCT...
  9. IntoTheVoid

    SQL Average Number of Items per Order Query!!!

    thanks will try again. must be me :) Edit: it works now. thanks again. just need to get my head around it now.
  10. IntoTheVoid

    SQL Average Number of Items per Order Query!!!

    I cannot get that to work. I have sample data such as follows: OrderItem OrderID 1 2 5 5 5 1 8 3 6 3 12 4 so I am trying to calculate 6 order items / 5...
  11. IntoTheVoid

    SQL Average Number of Items per Order Query!!!

    Hi, the table structure is: OrderItem integer OrderNumber integer In this table there is no quantity field. This is Access SQL. In this example I am just trying to return a single number that represents the average number of order items per order. Cheers. I know this is a contrived example, but...
  12. IntoTheVoid

    SQL Average Number of Items per Order Query!!!

    Hi, I have a table that lists Order Numbers and Order Items for each order number. I am trying to work out the average number of items per order, but am stuck in aggregate function errors. So for example there are 11 order items in total, and there are 4 different order numbers (with some listed...
  13. IntoTheVoid

    Mods please change Username

    ok, I have suffered enough. Can you change it back now please:)
  14. IntoTheVoid

    Mods please change Username

    Sorted. Cheers Mods.
  15. IntoTheVoid

    Mods please change Username

    Hi, Can you please change my username to: IntoTheVoid Cheers. Sorry if it is the wrong place.
  16. IntoTheVoid

    C# Object Oriented Programming

    Hi, I only mentioned databases as I could think of no other way.
  17. IntoTheVoid

    C# Object Oriented Programming

    That makes it a bit clearer. thanks.
  18. IntoTheVoid

    C# Object Oriented Programming

    I see now, you changed the reference with emp2 pointing to the emp object. So any changes made to either emp or emp2 would update the same object. I think !!!!
  19. IntoTheVoid

    C# Object Oriented Programming

    Thanks, that gives me something to work on. Enjoy the sun :)
Back
Top Bottom