Forum Replies Created

Viewing 15 posts - 31 through 45 (of 77 total)

  • RE: Export Data from SQL to Excel

    If you're using SSIS to export you can write the query when asked Copy table or Write Query.

  • RE: SQL Syntax

    Coldcoffee,

    Thanks. Not sure if posting data would apply in this situation. But, I posted data in the past and ended up with people responding with how valuable their time was...

  • RE: SUM(Case) issue

    Lynn / Lowell,

    Thanks for the help.

    Khalif

  • RE: SUM(Case) issue

    USE [productDetails]

    GO

    /****** Object: Table [dbo].[tbl_Assembly_Holds] Script Date: 12/03/2009 09:21:22 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[tbl_Assembly_Holds](

    [TagNumber] [float] NOT NULL,

    [WorkOrder] [nvarchar](7) NOT NULL,

    [WOUnit] [nvarchar](2) NOT NULL,

    [WOYear] [nvarchar](4)...

  • RE: SUM(Case) issue

    Two more tables will be posted.

    USE [productDetails]

    GO

    /****** Object: Table [dbo].[tbl_Assembly_Production] Script Date: 12/03/2009 07:42:25 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[tbl_Assembly_Production](

    [ID] [int] IDENTITY(1,1) NOT NULL,

    [DateProd] [datetime]...

  • RE: SUM(Case) issue

    Lowell,

    The problem is this:

    units 1-15 were produced on shift 1

    unit 16 was produced on shift 3

    We record startunit and endunit then, units produced.

    Ex. startunits = 1, endunits = 15 then,...

  • RE: SUM(Case) issue

    Lowell,

    Same results.

    Thanks,

    Khalif

  • RE: SUM(Case) issue

    Lowell,

    That's true. I inherited this project and have not changed much in the way of table structure. I'm open for suggestion. I need to get the correct output.

    Thanks,

    Khalif

  • RE: SUM(Case) issue

    CREATE TABLE [dbo].[tbl_Assembly_Holds](

    [TagNumber] [float] NOT NULL,

    [WorkOrder] [nvarchar](7) NOT NULL,

    [WOUnit] [nvarchar](2) NOT NULL,

    [WOYear] [nvarchar](4) NOT NULL,

    [Inspect_EmpNo] [int] NOT NULL,

    [Inspect_Date] [datetime] NOT NULL,

    [Disposition_ID] [int] NOT NULL,

    [Comment] [nvarchar](400) NULL,

    [Repair_EmpNo] [float] NULL,

    [Repair_Date] [datetime] NULL,

    [Repair_Notes]...

  • RE: SUM(Case) issue

    Lowell,

    There were 15 on shift 1 and 1 on shift 3.

    SELECT p.startUnits, p.endUnits, p.Shift, p.WorkOrder

    FROM tbl_Assembly_Production as p

    WHERE...

  • RE: Return Daily Values

    This is the code that got the results I wanted.

    select tbl_Assembly_holds.record_date,

    sum(case when shift = 1 then 1 else 0 end) Shift_1,

    sum(case when shift = 2 then 1 else...

  • RE: Return Monthly results

    USE [bloodLeads]

    GO

    /****** Object: Table [dbo].[bloodLeadQry] Script Date: 10/13/2009 11:43:01 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[bloodLeadQry](

    [NAME] [nvarchar](255) NULL,

    [DEPARTMENT] [nvarchar](255) NULL,

    [DOH] [nvarchar](50) NULL,

    [DATE] [nvarchar](50) NULL,

    [Pb] [int] NULL

    )...

  • RE: Return Monthly results

    What I need is, a column for each month.

    USE bloodLeads

    CREATe table MayResults

    (

    ResultID int IDENTITY (1,1) Primary Key NOT NULL,

    NAME nvarchar(255) NOT NULL,

    May2008 int NOT NUll,

    DOH nvarchar(50),

    Date nvarchar(50)

    )

    SELECT EmployeesBL.NAME, Pb...

  • RE: Return Daily Values

    Good afternoon all,

    I got the error fixed and data is returning correctly.

    Thanks for the help,

    DJ Khalif 😀

Viewing 15 posts - 31 through 45 (of 77 total)