Results 1 to 8 of 8

Thread: SQL help needed

  1. #1
    Join Date
    Jul 2008
    Posts
    4

    Question SQL help needed

    Can someone tell me if there is an operation/command that will allow me to pull a sample from a group of data? For example, I might say, if user id is populated >= 3000 return a sample of 50. Or if population is <= 500 return a sample of 5.

    Is this something SQL is capable of?

    Would really appreciate any help I can get.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    On which rdbms?

  3. #3
    Join Date
    Jul 2008
    Posts
    4
    Forgive me but I'm not familiar with rdbms. :-(

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can, you need to learn SQL language. All database systems understand ANSI SQL syntax.

  5. #5
    Join Date
    Jul 2008
    Posts
    4
    I have query results but need to know how to make the query return only a sample from the total population. The samples need to be random. Can someone just point me in the right direction? Which SQL operation/command do I need to research to accomplish the above task?

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    Which database do you use? Each vendor has their own functions and so to extend ansi sql.

  7. #7
    Join Date
    Jul 2008
    Posts
    4
    I use DB2 UDB for iSeries Query Manager in AS400

  8. #8
    Join Date
    Sep 2002
    Posts
    5,938
    You may check db2/400 sql manual.

Posting Permissions

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