Forum Replies Created

Viewing 15 posts - 4,531 through 4,545 (of 4,820 total)

  • RE: Get Missing Data with Tally Table

    I just realized my code will do an infinite loop if you add a new currency pair and don't have a rate for the first date in the range. ...

  • RE: Get Missing Data with Tally Table

    Here's a solution that should work on SQL 2000, but if table vars are 2005 only, just convert them to temp tables:

    --===== Create the test rates table

    DECLARE @MyTestRates TABLE (

    FromCurr...

  • RE: Problem in function

    I'm not sure I see why you need to bother calling a function to execute a stored procedure. It's just another level of abstraction. Why not...

  • RE: SQL 2005 Query to get time difference between two adjacent rows

    You don't need a WHILE loop or anything of that nature. Here's a set-based solution you can use with any given input table:

    DECLARE @LoginTable TABLE (

    UserID int,

    StartTime DateTime,

    StopTime...

  • RE: Split a date-range into periods

    Glad you have a working solution, but I feel the need to point out that with this new "split" table, the meaning of the value in the UNITS field has...

  • RE: how to use table data as column names

    This sounds like a situation where if you know the date (from the data) of the first day of the week, then you can generate a list of column names...

  • RE: LiteSpeed makes corrupt DoubleClick backups when over 4 GB?

    Is it possible that an executable simply cannot be allowed to load more than 4 GB of data because that's the maximum possible address space for a 32-bit system?

    I would...

  • RE: I want to change currency from $ to AED

    While the previous post will handle a single amount converted at a fixed rate, I have to wonder what you need to do with historical information? There are...

  • RE: Need help on performance and integrity

    I tried to post this late in the day, yesterday, but was having trouble with the website:

    Dan - I believe AnzioBake has now likely found the solution, but even he...

  • RE: Dangers of using MYSQL...What are they?

    I recently attended a computer user group meeting, and had the owner of a very small ISP tell me that MySQL outperforms SQL Server to a considerable degree, which I...

  • RE: Need help on performance and integrity

    Dan,

    Not to rain on your quest here, but I don't think you've actually provided a complete statement of the problem. I know that it's very clear to YOU...

  • RE: Where should the DBA Team exist?

    You must be getting paid awfully well that you can afford to throw pork chops 1000 times a week. Oh... wait... it's the same pork chop...

  • RE: Join problem

    The solution is easy - use COUNT with DISTINCT:

    DECLARE @Tab1 TABLE (

    Cpt varchar(50) COLLATE Cyrillic_General_CI_AS NULL

    )

    INSERT INTO @Tab1 (Cpt) VALUES('2')

    INSERT INTO @Tab1 (Cpt) VALUES('235')

    INSERT INTO @Tab1 (Cpt) VALUES('234')

    INSERT INTO @Tab1...

  • RE: Where should the DBA Team exist?

    Almost, but not quite... While the BS seems to occur more often than things getting done right the 1st time, I never allow myself to do things...

  • RE: Help needed with a CASE

    Ok, how about the following:

    CREATE PROCEDURE dbo.PTENCOUNTER_STUFF (

    @MRN varchar(5), -- '5079'

    @DIC_Status varchar(10),

    @ApptTypeID smallint

    )

    AS

    BEGIN

    SET NOCOUNT ON

    ;WITH DICTATION AS (

    SELECT MRN, Status, DOS

    FROM ptDictation

    WHERE MRN = @MRN AND

    Status = @DIC_Status

    ),

    SCHEDULE AS (

    SELECT...

Viewing 15 posts - 4,531 through 4,545 (of 4,820 total)