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
D

Deepak Kr1

@Deepak Kr1
About
Posts
8
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Browser Back Button
    D Deepak Kr1

    Use history.back(0); this should give you what you want...

    JavaScript javascript

  • Importing of Huge fixed width text file in sql server table
    D Deepak Kr1

    Use Data Import Export Wizard of Sql Server

    Database csharp asp-net database sql-server com

  • Select All Months and related data
    D Deepak Kr1

    Hey i just used the trunc method for oracle, u can replace to yr old year and month method to get the result, but the concept is that we will use the union clause to get the data for those month for which we dont have the data than we will do a union with yr old query then on the top of that put a sum for monthcount with group by month and year. so yr query will be

    select years, month, sum(MonthCount) from
    (
    SELECT YEAR(RequestedDate) as Years, Month(RequestedDate) as MonthInNumbers,Count(Month(RequestedDate))
    FROM MYTABLE
    group by YEAR(RequestedDate),Month(RequestedDate)
    union
    select '2012' as years, 'JAN' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'FEB' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'MAR' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'APR' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'MAY' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'JUN' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'JULY' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'AUG' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'SEPT' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'OCT' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'NOV' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'DEC' as Month, 0 as MonthCount from dual
    ) group by years, month

    Database help database

  • Select All Months and related data
    D Deepak Kr1

    Hope this will work

    select years, month, sum(MonthCount) from
    (
    SELECT to_char(trunc(RequestedDate, 'Year'), 'YYYY') as Years, to_char(trunc(RequestedDate, 'Month'), 'MON') as Month, count(to_char(trunc(RequestedDate, 'Month'), 'MON')) as MonthCount
    FROM MYTABLE
    group by to_char(trunc(RequestedDate, 'Year'), 'YYYY'), to_char(trunc(RequestedDate, 'Month'), 'MON')
    union
    select '2012' as years, 'JAN' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'FEB' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'MAR' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'APR' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'MAY' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'JUN' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'JULY' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'AUG' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'SEPT' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'OCT' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'NOV' as Month, 0 as MonthCount from dual
    union
    select '2012' as years, 'DEC' as Month, 0 as MonthCount from dual
    ) group by years, month

    Database help database

  • Select All Months and related data
    D Deepak Kr1

    Another option is the USE of Decode function that will also give u the correct result with out using the temp table or variable, if u can share the data of yr mytable then will try to give u the sql query.

    Database help database

  • Delete selected rows by table id using javascript
    D Deepak Kr1

    You can assign id to the TR element and when you want to delete the row then just set the innerText of that tr to '' blank. Hope this will help.

    JavaScript database csharp javascript help

  • How to mearge local database with server database
    D Deepak Kr1

    You can also user the SQL import Export wizard to transfer the data from one database to other database either table wise of bulk

    Database database sysadmin help tutorial announcement

  • Need help with a tricky MS SQL Query
    D Deepak Kr1

    Please try this one, if this helps, u might need to do some modification. ============= select Competencies.CompName AS compname, Users.FirstName AS firstname, Users.SurName AS surname, CompPos.Level AS positionlevel, CompUser.Level AS userlevel from Users left outer join compuser on users.userid = compuser.userid left outer join Competencies on compuser.compid = Competencies.compid left outer join CompPos on CompPos.compid = Competencies.compid left outer join Positions on Positions.posid = CompPos.posid and Positions.Position LIKE '%Corp HR-People Development-Wellness-Manager(Process)%' WHERE Users.UserId IN ('999209', 'helpdesk1', '999339', 'helpdesk5', '999827') --and Positions.Position LIKE '%Corp HR-People Development-Wellness-Manager(Process)%' ORDER BY CompPos.Level DESC, Competencies.CompName, CompUser.Level, Users.FirstName, Users.SurName

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