Forum Replies Created

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

  • RE: AutoNumber Integer to Varchar with min ID

    Sean Lange (2/25/2015)


    I didn't look at the new sample data until after you posted Luis. I assumed this was the very common "I have data that is mangled all over...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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 ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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))...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: List when both column values are null

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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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 ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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%'),

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

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