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
_

_Joao_

@_Joao_
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Getting Top 10 results per month/year
    _ _Joao_

    Well, that will not solve my problem, because I do not know exactly how many months/years there could be in the first place. I do have something like this: select count(ID), type, year(creation_date), month(creation_date) from table1 group by year(creation_date), month(creation_date), type which returns the count per type/month/year... After that I just want to show top 5 types per month/year... As I said, I could do something like what I want with a stored procedure, with a loop foreach month/year, but I do not know how to run a stored procedure from inside another stored procedure... I've tried 'exec sp_getdata' from inside the other stored procedure, but that didn't work... Joao

    Database database xml question

  • Getting Top 10 results per month/year
    _ _Joao_

    Hi there. I'm having some trouble trying to do the following: I have some data in my DB: ID (PK) type creation_date What I want to do is to get the top x results by month/year of creation_date. I already have a query to count the number of ID's in some month/year, grouped by type, with a 'group by'. This would return the number of ID's with type T in month mm of year yy, for all months and years that appear on creation_date. Now I need to return the top X results in month 01/2007, top X results in month 02/2007 and so on. I already make this happen, with a stored procedure, but I'm using another stored procedure to get all the data to a XML file, and I'm not being able to call the stored procedure with the top from the stored procedure that will generate the XML... Any ideia, anyone? :) Joao

    Database database xml question
  • Login

  • Don't have an account? Register

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