+ Reply to Thread
Results 1 to 2 of 2

Thread: Search Query

  1. #1

    Search Query

    i want SQL query that can bring up all rows that were added in the past 6 months. in table 'users' the date is in field 'joined' but its in UNIX time stamp format and also i want then like another SQL query the same as above but it also with the results sets the field 'activate' in each row to 'yes'

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    20
    View :
    Code:
     select * from users where datediff(mm, time_of_post, getdate()) <= 6
    update users
    Code:
     set activation = 'yes' where datediff(mm, time_of_post, getdate()) <= 6 and activation <> 'yes'

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

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