Forum Replies Created

Viewing 15 posts - 46 through 60 (of 394 total)

  • RE: Exception Handling/Logging

    It's easy to use the built-in logging.

    Right-click on the package background & this gives a sub-menu. Select "Logging..." which is the first option.

    This gives you a dialogue where you...

  • RE: Using Select Statement inside Case result

    Is this what you want?

    with cte as (

    select Count(*) as Base, Period, Name, CompanyName, CompanyAddress, Phone, Email, Gender,BusinessCategory, Location, Sector

    from

    (

    select Period, data, Identifier

    from TestTable1

    ) z

    pivot

    (

    ...

  • RE: Updating Table with CTE?

    This seems to work, if you group the updates by Year & Parcel.

    select * from #updateTable;

    begin tran

    GO

    with cte as

    (

    SELECT C2.Year, C2.Parcel

    ...

  • RE: Deleting Rows after Lookup

    Can you not create a dataset inner joining ds1 to ds2 (ie the tables in those ds) to eliminate the records with no join? Then you just use that ds...

  • RE: difficult group question

    WITH MyData AS (SELECT * FROM (VALUES (11,1),(12,1),(13,2),(14,3),(22,2),(22,2),(23,4),(24,4)) d (Item, [Count]))

    SELECT

    [Range]='10 to <20', [Count]=SUM(CASE WHEN Item >= 10 AND Item < 20 THEN [Count] ELSE 0 END)

    FROM MyData

    UNION

    SELECT

    '20...

  • RE: Comparison of months in SSRS

    I would do it in the SQL - join the table to itself on month -1 & then you can make the comparison

  • RE: Where clause question

    You need to specify the 5 records:

    select BF_ORGN_CD, BF_BDOB_CD, BF_TM_PERD_CD, data

    from BF_DATA

    WHERE (BF_ORGN_CD='A1' AND BF_BDOB_CD='B1' AND BF_TM_PERD_CD='C1')

    OR (BF_ORGN_CD='A2' AND BF_BDOB_CD='B2' AND BF_TM_PERD_CD='C2')

    OR (BF_ORGN_CD='A3' AND BF_BDOB_CD='B3' AND BF_TM_PERD_CD='C3')

    OR...

  • RE: Today's Random Word!

    Today

  • RE: Today's Random Word!

    Ed Wagner (3/9/2015)


    crookj (3/9/2015)


    whereisSQL? (3/9/2015)


    Revenant (3/9/2015)


    laurie-789651 (3/9/2015)


    Goat

    Cheese

    Dairy

    Cream

    Creme Brulee

    Tiramasu

  • RE: Today's Random Word!

    Goat

  • RE: Joining on a table with a Unique Clustered Index

    Hi. I'm not sure what you mean by "sproc" - it normally means stored procedure, but you do not show any stored procedures.

    You do not have to have indexes...

  • RE: Out of control table

    Why can't you just use MAX([File_Date]) as End_File_Date?

  • RE: Why am a receiving a NULL value?

    If you post sample data so people can just run it & see the problem, you will get plenty of replies.

    See this:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • RE: SQL join statement to include NULL values

    I think this is what you're trying to do.

    I'm assuming you will want to total OEORDD values:

    --== TEST DATA ==--

    USE [tempdb]

    GO

    IF OBJECT_ID('OEORDH') IS NOT NULL DROP TABLE OEORDH;

    IF OBJECT_ID('OEORDD') IS...

  • RE: CONVERT and CAST question?

    USE [tempdb]

    GO

    --== TEST DATA ==--

    IF OBJECT_ID('dbo.UserDetails') IS NOT NULL DROP TABLE dbo.UserDetails

    CREATE TABLE dbo.UserDetails

    (

    StaffNumber Varchar(30),

    Name Varchar(30),

    UserEmail Varchar(50) NULL

    )

    INSERT INTO dbo.UserDetails

    (StaffNumber, Name, UserEmail)

    VALUES

    ('A111116', 'Fred Smith', 'user1@email.com'),

    ('B22371', 'Jan Richards', NULL),

    ('X06742198', 'Anne Spencer',...

Viewing 15 posts - 46 through 60 (of 394 total)