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
F

faizankhan

@faizankhan
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to query this? [modified]
    F faizankhan

    the best soultion is create a cursor and put cursor in stored procedure(SP) , finally call SP ------------------------------- declare @vdd bigint declare C1 cursor for Select distinct id from pdata open C1 drop table #temsales CREATE TABLE #temsales ( col1 bigint, col2 datetime, col3 bigint ) fetch next from c1 into @vdd while @@fetch_status=0 begin insert into #temsales select top 5 * from pdata where sales>0 and id =@vdd fetch next from c1 into @vdd end close c1 deallocate c1 select * from #temsales ;)

    Database database tutorial 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