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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Query Help

Query Help

Scheduled Pinned Locked Moved Database
helpdatabasebeta-testingquestion
3 Posts 2 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.
  • H Offline
    H Offline
    Hulicat
    wrote on last edited by
    #1

    I am running the following query: select sum(total) as 'Total QA Hours For F.I Centralized Alert Int', task.name as 'Project' from trans inner join task on task.name=trans.task where trans.project = '374' and [date] >= '1/31/2007' group by task.name The following error is returned. Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to bigint. Trans.task = bigint Task.Name = Varchar (250) trans.Total = float Prsumably I need to use cast? I have not been able to figure this one out. Any help would be greatly appreciated.

    Regards, Hulicat

    M 1 Reply Last reply
    0
    • H Hulicat

      I am running the following query: select sum(total) as 'Total QA Hours For F.I Centralized Alert Int', task.name as 'Project' from trans inner join task on task.name=trans.task where trans.project = '374' and [date] >= '1/31/2007' group by task.name The following error is returned. Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to bigint. Trans.task = bigint Task.Name = Varchar (250) trans.Total = float Prsumably I need to use cast? I have not been able to figure this one out. Any help would be greatly appreciated.

      Regards, Hulicat

      M Offline
      M Offline
      M H 1 2 3
      wrote on last edited by
      #2

      select sum(total) as 'Total QA Hours For F.I Centralized Alert Int' , task.name as 'Project' from trans inner join task on task.name=Cast(trans.task as varchar(250)) where trans.project = '374' and [date] >= '1/31/2007' group by task.name

      H 1 Reply Last reply
      0
      • M M H 1 2 3

        select sum(total) as 'Total QA Hours For F.I Centralized Alert Int' , task.name as 'Project' from trans inner join task on task.name=Cast(trans.task as varchar(250)) where trans.project = '374' and [date] >= '1/31/2007' group by task.name

        H Offline
        H Offline
        Hulicat
        wrote on last edited by
        #3

        Thanks, I just read another one of your replies to someone elses problem that helped me with something else I am trying to do. I really appreciate the help!

        Regards, Hulicat

        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