Results 1 to 5 of 5

Thread: Issue Comparing data in an sql server DB

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2010
    Posts
    17

    Issue Comparing data in an sql server DB

    i need to compare 2 tables in my database tutor and student

    i have in student table: name, id , starting_schedule and finish_schedule gathering in there the time the student start a course and when the class finish for example if i have class from 8 - 10 it will say starting_schedule = 8 and finish schedule = 10 i need to compare all the schedules in the table with the available time in tutor table for example i have in student 8 - 10 11-12 1-2 and i have in tutor available_Time = 9 available_Time = 10 available_Time = 11

    that mean tutor is available at 9 available at 10 and 11

    how can i compare the info i have so i know if i can put that student in tutoring at that time?

    *sorry for my english

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Issue Comparing data in an sql server DB

    How are the times stored? As Times? As String? What database?
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2010
    Posts
    17

    Re: Issue Comparing data in an sql server DB

    it's stored as string

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Feb 2010
    Posts
    17

    Re: Issue Comparing data in an sql server DB

    my main question is how do i compare data in a database i need to compare 2 values in the database

  5. #5
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Issue Comparing data in an sql server DB

    You compare by using a between statement.... the problem you will have is that they are text and this will cause problems trying to get the values correct.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width