Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problems with SQL

Problems with SQL

Scheduled Pinned Locked Moved ASP.NET
databasehelplearning
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Britney S Morales
    wrote on last edited by
    #1

    Im looking for a query who get result in packages let me explain select * from users where codgroup = 1 i get all the user belongs to group 1 (100 users) i want a query who get the rows by package (ten could be). PD: Only sql statements, not using paging gridview property I hope you can help me :sigh:

    keep Learning and you never will be out of date...

    M J E 3 Replies Last reply
    0
    • B Britney S Morales

      Im looking for a query who get result in packages let me explain select * from users where codgroup = 1 i get all the user belongs to group 1 (100 users) i want a query who get the rows by package (ten could be). PD: Only sql statements, not using paging gridview property I hope you can help me :sigh:

      keep Learning and you never will be out of date...

      M Offline
      M Offline
      Member 96
      wrote on last edited by
      #2

      I'm not sure what this has to do with asp.net, perhaps try the correct forum which in this case would be the SQL one and you might have more luck. Also your question is a little unclear by what you mean by "packages".

      1 Reply Last reply
      0
      • B Britney S Morales

        Im looking for a query who get result in packages let me explain select * from users where codgroup = 1 i get all the user belongs to group 1 (100 users) i want a query who get the rows by package (ten could be). PD: Only sql statements, not using paging gridview property I hope you can help me :sigh:

        keep Learning and you never will be out of date...

        J Offline
        J Offline
        just3ala2
        wrote on last edited by
        #3

        Search for paging for your control. CodeProject has many controls for that

        Best Regards 3ala2 :)

        1 Reply Last reply
        0
        • B Britney S Morales

          Im looking for a query who get result in packages let me explain select * from users where codgroup = 1 i get all the user belongs to group 1 (100 users) i want a query who get the rows by package (ten could be). PD: Only sql statements, not using paging gridview property I hope you can help me :sigh:

          keep Learning and you never will be out of date...

          E Offline
          E Offline
          ednrgc
          wrote on last edited by
          #4

          Forgive my ignorance, but I'm not sure I understand what you mean by packages. Are they physical packages, Oracle packages, or something else?

          B 1 Reply Last reply
          0
          • E ednrgc

            Forgive my ignorance, but I'm not sure I understand what you mean by packages. Are they physical packages, Oracle packages, or something else?

            B Offline
            B Offline
            Britney S Morales
            wrote on last edited by
            #5

            Somebody tell me that SELECT * FROM users LIMIT 0, 10 i could get the firsts ten registers, later i could use the sentence SELECT * FROM users LIMIT 11, 20, in order to get the 11 to 20 users data. But i doesnt work, :doh: did you get the idea???

            keep Learning and you never will be out of date...

            E 3 Replies Last reply
            0
            • B Britney S Morales

              Somebody tell me that SELECT * FROM users LIMIT 0, 10 i could get the firsts ten registers, later i could use the sentence SELECT * FROM users LIMIT 11, 20, in order to get the 11 to 20 users data. But i doesnt work, :doh: did you get the idea???

              keep Learning and you never will be out of date...

              E Offline
              E Offline
              ednrgc
              wrote on last edited by
              #6

              Since SQL Server does not have a limit clause, I'm assuming that you are using another backend database. What DB are you using?

              1 Reply Last reply
              0
              • B Britney S Morales

                Somebody tell me that SELECT * FROM users LIMIT 0, 10 i could get the firsts ten registers, later i could use the sentence SELECT * FROM users LIMIT 11, 20, in order to get the 11 to 20 users data. But i doesnt work, :doh: did you get the idea???

                keep Learning and you never will be out of date...

                E Offline
                E Offline
                ednrgc
                wrote on last edited by
                #7

                It may also help to have a general database schema (don't include specific business data for security reasons) or a mock DB schema. I'm getting the feeling that your solution would be solved by an inner join with a TOP clause on the right side table.

                1 Reply Last reply
                0
                • B Britney S Morales

                  Somebody tell me that SELECT * FROM users LIMIT 0, 10 i could get the firsts ten registers, later i could use the sentence SELECT * FROM users LIMIT 11, 20, in order to get the 11 to 20 users data. But i doesnt work, :doh: did you get the idea???

                  keep Learning and you never will be out of date...

                  E Offline
                  E Offline
                  ednrgc
                  wrote on last edited by
                  #8

                  You could try a stored procedure like the following: CREATE PROCEDURE [dbo].[usp_GetnRecordsForEachUser] ( @userID int, @maximumRows int ) AS SET ROWCOUNT @maximumRows SELECT u.* FROM users u WHERE userid = @userID ORDER BY u.userID SET ROWCOUNT 0 GO

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups