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. Excel Query [modified]

Excel Query [modified]

Scheduled Pinned Locked Moved Database
databasehelptutorial
2 Posts 1 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.
  • S Offline
    S Offline
    Sunil Wise
    wrote on last edited by
    #1

    Hi frns,

    select CONVERT(varchar ,[regdate],103) Dates,[user],[client facility],sum([payroll score])LC from [sheet1$]
    group by [user],[client facility], CONVERT(varchar ,[regdate],103) order by [user]

    i am programatically retreving data from excel sheet. for retriving data from excel the query i have written is the above but it is giving me error. the error is :Syntax error (missing operator) in query expression 'CONVERT(varchar ,[regdate],103) Dates'. How to use the convert function in excel query regards sunilwise

    modified on Monday, December 1, 2008 4:53 AM

    S 1 Reply Last reply
    0
    • S Sunil Wise

      Hi frns,

      select CONVERT(varchar ,[regdate],103) Dates,[user],[client facility],sum([payroll score])LC from [sheet1$]
      group by [user],[client facility], CONVERT(varchar ,[regdate],103) order by [user]

      i am programatically retreving data from excel sheet. for retriving data from excel the query i have written is the above but it is giving me error. the error is :Syntax error (missing operator) in query expression 'CONVERT(varchar ,[regdate],103) Dates'. How to use the convert function in excel query regards sunilwise

      modified on Monday, December 1, 2008 4:53 AM

      S Offline
      S Offline
      Sunil Wise
      wrote on last edited by
      #2

      no probs i got the solution i modified my query to string sql = "select format([dateregistered],'MM/dd/yyyy') as Dates,[user],[client facility],sum([payroll score]) as LC from [sheet1$] group by [user],[client facility], format([dateregistered],'MM/dd/yyyy') order by [user]"; its working for me.......... ;) ;)

      modified on Monday, December 1, 2008 4:54 AM

      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