Forum Replies Created

Viewing 15 posts - 3,151 through 3,165 (of 8,753 total)

  • RE: looking for a set based solution

    mrpolecat (9/25/2016)


    The incentive periods are 3 calendar months if there are no suspensions not including the end date in your example.

    If an agreement starts on 1/1/2016 then the baseline incentive...

  • RE: Slowly changing territory assignment?

    pietlinden (9/24/2016)


    Good news! Easy question...

    I have a simple data warehouse. Looks pretty much like your standard sales data warehouse with dimensions (why do I want to write "Dementias"??) like:

    Customer

    Product

    Calendar

    Territory...

    The only...

  • RE: looking for a set based solution

    Quick questions

    😎

    1) By activity period of 3 months, do you mean three full calendar months, i.e. 1st. January to 1st. April, including both start and end dates?

    2) Does the duration...

  • RE: Appdomain Memory errors in SQL Server Errorlog

    Quick questions

    1) How large are the data sets which are being processed in the SSIS packages?

    2) Are those sets sorted within the packages?

    3) Are the DefaultMaxBufferSize and...

  • RE: Extract XML column to insert into table

    rodjkidd (9/23/2016)


    Hi Eirikur,

    Thanks for replying.

    I'm actually on my way home.

    I'll check when I get in.

    I had to anonomise the data manually so I may have messed up something. Both the...

  • RE: Urgent Help Need for DB Restoration

    GilaMonster (9/23/2016)


    Eirikur Eiriksson (9/23/2016)


    the @with additional parameters should be all in one line, something along this line:

    @with = 'replace ,move "Logicalfilename" to "F:\Data\TestDB.mdf" ,move LogicalFilenameofLog" to "F:\Logs\TestDB.ldf"'

    Restore is whitespace agnostic,...

  • RE: Urgent Help Need for DB Restoration

    ramana3327 (9/23/2016)


    Hello Experts,

    I am facing issues with database restoration using different server backup.

    We have SQL 2005 instance. I took backup of the database (Nearly 1 TB) using Litespeed.

    The command I...

  • RE: How do I initialise a sql variable to 0 in stored-procedure ?

    Quick thought, the value of the variable will not be compiled but set at run time

    😎

    CTE example to get an execution plan

    DECLARE @VAR_01 INT;

    SET ...

  • RE: Extract XML column to insert into table

    Cleaned up the XML, here is a query that brings back the desired tags by the looks of it, not all the values are matching though???.

    😎

    DECLARE @TXML XML = N'<?xml...

  • RE: Extract XML column to insert into table

    rodjkidd (9/23/2016)


    Oh and a couple of other things. The non repeating tags (header and footer in my head) are counted as rank 1, along with the first repeating group. Its...

  • RE: how to make a query for series of records ?

    Everything needed was already in the code sample;-), here is a function that returns one year

    😎

    USE TEEST;

    GO

    SET NOCOUNT ON;

    GO

    CREATE FUNCTION dbo.ITVFN_CALENDAR_YEAR

    (

    @YEAR INT

    )

    RETURNS TABLE

    WITH...

  • RE: how to make a query for series of records ?

    Quick inline calendar table example using the sample data posted previously on this thread.

    😎

    USE TEEST;

    GO

    SET NOCOUNT ON;

    IF OBJECT_ID(N'tempdb..#tamp') IS NOT NULL DROP TABLE #tamp;

    CREATE TABLE #tamp

    ( WeekNo INT, FromDate SMALLDATETIME,...

  • RE: How do I initialise a sql variable to 0 in stored-procedure ?

    For a variable inside the procedure use this

    😎

    DECLARE @MY_INT_VAR INT;

    SET @MY_INT_VAR = 0;

  • RE: Processing Flat file with no delimiters

    joeroshan (9/21/2016)


    A quick and simple solution with good old joins.

    Select

    CustomeridID.Data as CustomeridID ,

    AccountID.Data as AccountID,

    EnquiryName.Data as EnquiryName,

    Source.Data as Source,

    EventDate.Data as EventDate,

    EventDays.Data as EventDays,

    EnquiryCreatedDate.Data as EnquiryCreatedDate,

    Description.Data as Description

    FROM dbo.[DataTEST]...

  • RE: Processing Flat file with no delimiters

    This will pivot the data sets to columns

    😎

    IF OBJECT_ID(N'dbo.DataTEST') IS NOT NULL DROP TABLE dbo.DataTEST;

    CREATE TABLE [dbo].[DataTEST](

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

    Data [varchar](255) NULL

    ) ON [PRIMARY]

    INSERT INTO dbo.[DataTEST]

    ...

Viewing 15 posts - 3,151 through 3,165 (of 8,753 total)