Forum Replies Created

Viewing 15 posts - 5,956 through 5,970 (of 26,490 total)

  • RE: How do I write this code?

    rrdavis07 (9/2/2014)


    Can't seem to figure this one out, although it seems like it should be rather simple. I really appreciate your time and response.

    Consider the following Table:

    How would I...

  • RE: Are the posted questions getting worse?

    Am I missing something? Doesn't this error mean that the table or view doesn't exist, not that there is a problem with the WHERE clause?

    OLE DB provider "MSDASQL" for...

  • RE: Error Single quote stored in variable

    Welsh Corgi (9/2/2014)


    Lynn Pettis (9/2/2014)


    Welsh Corgi (9/2/2014)


    Ed Wagner (9/2/2014)


    Good. Now all you have to do is look at the format mask of your TO_DATE function.

    TO_DATE(''2014-09-02'',''YYYY.MM.DD'')

    The date string doesn't match...

  • RE: Error Single quote stored in variable

    Welsh Corgi (9/2/2014)


    Ed Wagner (9/2/2014)


    Good. Now all you have to do is look at the format mask of your TO_DATE function.

    TO_DATE(''2014-09-02'',''YYYY.MM.DD'')

    The date string doesn't match the format string.

    Thanks.

    I need...

  • RE: Happy Monday

    Good question and interesting function.

    Only complaint I have with the function right now is the inconsistency in the coding. As is the function won't compile on a system using...

  • RE: Create 3 views with IF ELSE??

    You are welcome. Dynamic SQL can be a pain to write, I should know as I have written my share of it.

  • RE: sql server sand box

    Last I checked MOSS required SQL Server Standard Edition or better.

    A SQL Server Sandbox is a usually a database on a SQL Server Test or Development box where developers and/or...

  • RE: Create 3 views with IF ELSE??

    Try this:

    IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cusUDSPatientRaceEthnicityCPS12_2014]'))

    DROP VIEW [dbo].[cusUDSPatientRaceEthnicityCPS12_2014]

    GO

    IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cusUDSPatientRaceEthnicityCPS1_2014]'))

    DROP VIEW [dbo].[cusUDSPatientRaceEthnicityCPS1_2014]

    GO

    IF EXISTS (SELECT 1 FROM sys.objects WHERE...

  • RE: Error Single quote stored in variable

    Welsh Corgi (9/2/2014)


    Lynn,

    Sorry I missed your post. I have everything but the date.

    This is the exact code that I have.

    Thank you.

    DECLARE @SQLQuery NVARCHAR(255)

    ...

  • RE: Create 3 views with IF ELSE??

    This perhaps?

    IF dbo.cusGetCPSVersion()='Apples'

    BEGIN

    exec ('CREATE VIEW APPLES AS SELECT * FROM APPLES_FRUIT')

    END

    ELSE

    BEGIN

    exec ('CREATE VIEW ORANGES AS SELECT * FROM ORANGES_FRUIT')

    END

  • RE: Are the posted questions getting worse?

    Curious how the code that our silver spooner posted even worked. After declaring all the variables I still have a bunch of red squiggly lines.

  • RE: Error Single quote stored in variable

    Lynn Pettis (9/2/2014)


    I did it this way:

    declare

    @SQLCmd nvarchar(max),

    @MyDate DATE;

    set @MyDate = '20140808';

    select @SQLCmd = N'

    SELECT

    CAST(CAE_RDB_ENTRY_DATE as Date),

    ...

  • RE: Are the posted questions getting worse?

    And once again the SSC Silver Spoons are out and available, even mine.

  • RE: Error Single quote stored in variable

    EDIT: The following is wrong!

    I did it this way:

    declare

    @SQLCmd nvarchar(max),

    @MyDate DATE;

    set @MyDate = '20140808';

    select @SQLCmd = N'

    SELECT

    CAST(CAE_RDB_ENTRY_DATE as...

  • RE: enumerating gaps between islands, ideas?

    Dwain,

    Actually, I just wanted to understand the pieces. I really need to learn the extensions to the windowing functions in 2012.

Viewing 15 posts - 5,956 through 5,970 (of 26,490 total)