Forum Replies Created

Viewing 15 posts - 7,651 through 7,665 (of 10,144 total)

  • RE: Optimizing query

    LadyG (7/15/2010)


    Hi Chris,

    How do I create a date table? Here's what the function does below

    CREATE FUNCTION [dbo].[fn_ConvertToBusinessDate] (@Date DATETIME) RETURNS DATETIME AS

    BEGIN

    DECLARE @RollOverTime DATETIME

    SELECT @RollOverTime = [RollOverTime]

    FROM [dbo].[ac_Estate]

    SELECT @Date =...

  • RE: Between Statment only for current day

    jon pill (7/16/2010)


    I am not a SQL expert just things I have picked up to do simple queries.

    I don't know about connection pooling either, but I will read up on...

  • RE: CTE - Avoiding the cursor

    Eugene Elutin (6/30/2010)


    Actually, recursive CTE is not far from RBAR (can be even worse in performance)...

    Not strictly true. A good example of RBAR would be performing a running totals update...

  • RE: Today's Random Word!

    Paul White NZ (7/15/2010)


    Paragordius tricuspidatus

    (today's random worm)

    Haven't done that for a while 🙂

    Isn't nature wonderful? 😀

  • RE: Are the posted questions getting worse?

    Paul White NZ (7/15/2010)


    Jeff Moden (7/15/2010)


    Can you good folks give me an example of when IDENTITY will not work?

    When you need a sequence across several tables

    When you need to pre-allocate...

  • RE: Between Statment only for current day

    jon pill (7/15/2010)


    I am running the query from Chris, it does not take long, not sure how long but I do notice some delay.

    I keep the connection open at the...

  • RE: Between Statment only for current day

    How long does the query take to run?

  • RE: Nested CASE query issue

    ,CASE

    WHEN DATEADD (year, 1, MAX(dd.ActualDate)) >= GETDATE() AND fo.Product IN (62,64) THEN 'Upgrade_Year'

    WHEN DATEADD (month, 3, MAX(dd.ActualDate)) >= GETDATE() AND fo.Product IN (61,63) THEN 'Upgrade_3Months'

    ELSE 'Upgrade_Basic'

    END...

  • RE: SSIS date with a value as '-' should be inserted as null

    itsaditi2001 (7/15/2010)


    In an SSIS package I am using a Excel source with a date column, and some of the dates are hyphen . I want these hyphens to be treated...

  • RE: Between Statment only for current day

    jon pill (7/15/2010)


    drop table #TodayRecords

    Is this the fastest way, i will have over a 100 lines and will be calling sql every 500ms?

    Why would you want to run the code...

  • RE: Today's Random Word!

    tosscrosby (7/14/2010)


    OK, now we're getting somewhere. Do you have four or more of these symptoms?

    Dyspnea

    Palpitations

    Chest pain or discomfort

    Choking or smothering sensations

    Vertigo or unsteady feelings...

  • RE: Between Statment only for current day

    jon pill (7/14/2010)


    There will be gaps but it matters little, i only need to get the data the same way every time

    The same with duplicates, it wont affect the hi...

  • RE: Between Statment only for current day

    jon pill (7/14/2010)


    I have data that I want to find the Min and Max off, for 2 fields

    Upvolume and DownVolume

    Every day the Totaltrades field starts at zero and cumulates throughout...

  • RE: Between Statment only for current day

    jon pill (7/14/2010)


    you right that cant be it either

    Describe it in words. Be nice!

  • RE: Between Statment only for current day

    jon pill (7/14/2010)


    SELECT min(upvolume),min(downvolume),min(upvolume),min(downvolume)

    FROM

    (SELECT upvolume,downvolume,TotalTrades from DBVaskVbid WITH (NOLOCK) where BarStamp >= '7/14/2010') as XDtable

    WHERE TotalTrades

    BETWEEN

    (SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK) where BarStamp >= '7/14/2010') -1000

    AND

    (SELECT...

Viewing 15 posts - 7,651 through 7,665 (of 10,144 total)