Forum Replies Created

Viewing 15 posts - 5,176 through 5,190 (of 8,731 total)

  • RE: AutoNumber Integer to Varchar with min ID

    If you have a Member_ID is your correct identifier for each person, then this should give you the correct information.

    CREATE TABLE SampleData(

    FIRST_NAME ...

  • RE: Does MSSQL have DIMENSION functionality as Oracle, please?

    I can't remember anything like this in T-SQL. It can be simulated with other instructions, but the real functionality would be using MDX. Unless someone else can think of something...

  • RE: Recursive Query

    So you include the whole history each month? Or why do you have only "enddate < @d1"?

    This is an example of filtering using 6 months.

    SELECT *

    FROM SomeTable st

    JOIN (VALUES(0),(-1),(-2),(-3),(-4),(-5))...

  • RE: Recursive Query

    Without the information requested previously by Alan and me.

    The only help I can give is this: The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url]

    Read...

  • RE: Need a query

    I wasn't sure about this, but it seems to work. It's resource intensive because there are lots of combinations. I don't have time to comment the code, but I strongly...

  • RE: Recursive Query

    That doesn't sounds like a need of recursive queries. It seems to me that a tally table could do the job or just a date range.

    We need more details including...

  • RE: You have a Windows 2000 Advanced Edition Server...

    Eirikur Eiriksson (2/24/2015)


    Steve Jones - SSC Editor (2/24/2015)


    This was a 2003 question

    It popped up on "Recent Posts" two days ago, thought it was funny:-D

    😎

    Is to remind us how things have...

  • RE: List when both column values are null

    I didn't want to post any code because this seems a lot like homework.

  • RE: List when both column values are null

    What have you tried? Why would you have a row with a phone set as null instead of not having a row at all?

    You could at least post DDL, sample...

  • RE: convert Stored Procedure to User Defined Function

    Sangeeth878787 (2/24/2015)


    Hi Luiz,

    I am really thankful for your conversion script, can you suggest me, based on this function logic, I need to add extra columns in SSIS, could you ...

  • RE: convert varchar '100%' to float '1.00'

    I can't reproduce your problem. Or maybe you're doing something different.

    CREATE TABLE Test(

    string_pct varchar(10))

    INSERT INTO Test

    VALUES

    ('100%'),

    ('50%'),

    ...

  • RE: Using an expression in a GROUP BY clause

    Why do you have the division in the GROUP BY but not in your column list?

    You need to either include it in both or remove it from both.

    Could you post...

  • RE: MMM DD YYY to YYYYMMDD

    Phil Parkin (2/23/2015)


    Luis Cazares (2/23/2015)


    There's no need to over complicate it.

    Actually, if you're inserting into an integer column, you don't need the CAST() from this example as it will be...

  • RE: select query works but delete query throws error

    I'm not sure if someone explained it wrong or if you misunderstood what happens in SQL.

    SQL (in this case T-SQL) is a declarative language, so you tell the engine what...

  • RE: MMM DD YYY to YYYYMMDD

    There's no need to over complicate it.

    Actually, if you're inserting into an integer column, you don't need the CAST() from this example as it will be implicitly converted.

    declare @dt varchar(12)...

Viewing 15 posts - 5,176 through 5,190 (of 8,731 total)