Forum Replies Created

Viewing 15 posts - 7,741 through 7,755 (of 26,490 total)

  • RE: Need help with CASE

    maxlezious (5/3/2013)


    Hi, I have a select statement and i am selecting the results of the select statement as @clientName

    Now I want to do a like on the @clientName, so if...

  • RE: Shrinking the log file does not reduce size

    What version (edition) of SQL Server ar you currently using?

  • RE: Matching records

    Confused:

    For example:

    One customer has 3 payments but only 2 were processed into subscriptions.

    Sample data:

    Payments

    UniqueId CustomerId Amount Date

    1 ABCD 25 1/1/13

    7 ABCD 25 1/1/13

    25 ABCD 25 1/1/13

    Subscriptions

    UniqueId CustomerId Amount Date

    22 ABCD...

  • RE: not able to insert data for selected day.

    Could you please provide the DDL (CREATE TABLE statement) for the target table of the procedure and the expected results based on the sample data input provided for the procedure.

    I...

  • RE: Are the posted questions getting worse?

    L' Eomot Inversé (5/3/2013)


    ChrisM@Work (5/3/2013)


    Lynn Pettis (5/2/2013)


    Okay, I have to ask without pointing to anything specific, do any of you think I have been harassing any of the OP's recently...

  • RE: CURSOR - running very slow

    Sean Lange (5/2/2013)


    npyata (5/2/2013)


    Here is the updated code: Still this is running slow.

    DECLARE @log_id INT

    DECLARE @vr_seqno INT

    DECLARE @getlogid CURSOR

    SET @getlogid = CURSOR FOR

    SELECT log_id

    FROM [testdb].[dbo].[match_event_log]

    OPEN @getlogid

    FETCH NEXT

    FROM @getlogid INTO @log_id

    WHILE...

  • RE: CURSOR - running very slow

    npyata (5/2/2013)


    I have included the where caluse :

    where log_timestamp_dt between '2010-01-01 00:00:00.000' and '2010-02-28 00:00:00.000'

    order by log_idlog_timestamp_dt between '

    I want to increament the log_seqno. So I am using the vr_seqno=@vr_seqno...

  • RE: 11G table appears to have "No data found" after its creation.

    There are a few people here on ssc that know Oracle, but you would probably get an aswer to this question faster on a site dedicated to Oracle. This...

  • RE: CURSOR - running very slow

    Now you are missing a where clause for your update statement. Also, no where do you initialize @vr_seqno, so this value starts as null and stays null as null...

  • RE: Get Latest Revision of Attribute Based on Date

    Based on your post, the following:

    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[test]') AND type in (N'U'))

    DROP TABLE [dbo].[test]

    GO

    CREATE TABLE [dbo].[test](

    id [int] NOT NULL,

    [fk] [int] NOT NULL,

    [col1]...

  • RE: A Pivot, but not exactly.

    Use something like this:

    with basedata as (

    select distinct

    FK_ID

    from

    dbo.MyTable

    )

    select

    FK_ID,

    NewVal = stuff((select ',' + Value

    ...

  • RE: CURSOR - running very slow

    Just looking at the cursor code itself, it looks like there is a FETCH missing inside the while loop, or did I just miss seeing it?

  • RE: Are the posted questions getting worse?

    Okay, I have to ask without pointing to anything specific, do any of you think I have been harassing any of the OP's recently rather than helping them?

  • RE: is it possible to union all two CTEs?

    Matt Miller (#4) (5/1/2013)


    I think you're looking for something like this.

    ;with ct1 as

    (select

    name

    ,Duration, 2 as rank

    from #temp

    ), ct2 as

    (

    select

    name

    , sum(Duration) as value

    , 'Duration' as category,

    , 1...

  • RE: Script Task C# Code(The name 'Dts' does not exist in the current context)

    As opc.three said earlier, you can use any .NET language you want in SSIS 2005 as long as it is VB.NET. C# support was added in SQL Server 2008.

Viewing 15 posts - 7,741 through 7,755 (of 26,490 total)