Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007
    Location
    Belfast, N.I
    Posts
    1
    Plugin Contributions
    0

    Default Transfer SQL Data Results To Excel Sheet

    Code:
    -- (1) Number of calls received for each priority of call [for a specified date range]
    
    declare @startdate datetime,
    @finishdate datetime
    
    select RM.fldPriorityCode as 'Priority',
    count(RM.fldRequestID) as 'Calls'
    from tblRequestMaster RM
    where RM.fldPriorityCode between 1 and 5
    and RM.fldRequestDate between '01-01-2007' and '03-05-2007'
    and RM.fldRequestFlag like 'D'
    group by RM.fldPriorityCode 
    union
    select 
    'Total' as 'Priority',
    count(RM.fldRequestID) as 'Calls'
    from tblRequestMaster RM
    where RM.fldPriorityCode between 1 and 5
    and RM.fldRequestDate between '01-01-2007' and '03-05-2007'
    and RM.fldRequestFlag like 'D'
    order by RM.fldPriorityCode asc
     
    
    Results:
    
    Priority	Calls		
    1	20		
    2	2912		
    3	152		
    4	571		
    5	4		
    Total	3659

    I would like to transfer these results to an excel sheet. For instance when the user opens up the excel worksheet and types in for a example a start date: 01-01-2007 and an end date: 03-05-2007 (into textboxes) then clicks a button say called 'Get stats' and then the results appear on the sheet.


    How can this be done?
    --------------------------------------------------
    http://floetichoney.spaces.live.com
    --------------------------------------------------

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Transfer SQL Data Results To Excel Sheet

    What software is this inquiry about ?

    That's not Zen Cart code.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Export product to excel sheet
    By UrbanClothingExpress in forum General Questions
    Replies: 4
    Last Post: 23 Jun 2009, 04:58 AM
  2. importing stock from an excel spread sheet
    By jimbob202002 in forum General Questions
    Replies: 1
    Last Post: 17 Sep 2007, 11:34 AM
  3. Export product to excel sheet
    By UrbanClothingExpress in forum General Questions
    Replies: 1
    Last Post: 19 Jul 2006, 04:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR