Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dave796

    multiple counts one record

    Thanks thought there would be an easier way than what I was thinking of.
  2. dave796

    multiple counts one record

    im trying to get 2 counts onto one record in MS access I currently have 2 queries to generate the 2 counts and then join them but with to combine this all into one. The first query gets a count like this: SELECT Count(sttdstud.student_id) AS [Actual Attendances], Mid$([SchoolDept],1,1) AS...
  3. dave796

    Can this be run faster (NOT EXISTS)

    I mostly solved the problem changed to this: SELECT A.*, B.register_group AS Out FROM [Full Register List] AS A LEFT JOIN dbo_stthpwka AS B ON (B.register_id = A.register_id and B.register_group = A.register_group and B.week_no = WeekNo) WHERE B.register_group NOT LIKE "*"; This runs near...
  4. dave796

    Can this be run faster (NOT EXISTS)

    I have a table Full Register List containing about 8000 registers along with each of the weeks they are run in the fields are register_id, register_group, WeekNo which are combined to make the primary key. So for each register_id and register_group there is usually a record for each week the...
  5. dave796

    get a week range to record for each week?

    Yeah you understood correctly thanks for the idea I just need to do a select on the weeks table between start_week and end_week as my registers don't run week 1 to 53 they usually run something like week 7 to 40 as its academic year timetables. Anyway should be easy enough from here thanks.
  6. dave796

    get a week range to record for each week?

    Im trying to find unmarked registers from two existing tables. Registers contains register_id, start_week, end_week so start_week could be 7 and end_week 36 this is all registers setup with unique register_id. Then marked which conatins register_id, week signifying the register has been...
  7. dave796

    concatenate strings from different records

    ok thanks I didn't find out about the COALESCE function managed to use the GROUP_CONCAT function. Thanks for the help
  8. dave796

    concatenate strings from different records

    Hi im wondering if there is a way to concatenate a set of strings when field1 is the same hopefully with a comma seperating each part. E.G Field1 Field2 abc 122qq def 456ww abc 789rt ghi 999zt def 873gh EQUALS Field1 Field2 abc 122qq, 789rt def...
  9. dave796

    Get other rows from DISTINCT satement

    I am trying to display a set of records based on a SELECT DISTINCT Field1 statement, however I would like to display other fields in the record without it being assessed if they are distinct from another record or not. (i.e NOT DISTINCT Field1, Field2). I should note it doesn't matter at all...
  10. dave796

    Compare a field with itself on same database

    Thanks for the help looked up inner join got my problem sorted.
  11. dave796

    Compare a field with itself on same database

    Hi i know the basics of sql but have struck a problem. I am trying to write a query to display records from a database where the field1 is the same as another records field1 in the same file but field2 is different any help would be great. ps. These are text fields so I am using the like...

Part and Inventory Search

Back
Top