Forum Replies Created

Viewing 15 posts - 2,371 through 2,385 (of 8,731 total)

  • RE: joining multiple tables without a join

    skippyV (8/4/2016)


    I can't post the actual code. But I can describe the tables.

    There are no indexes and no primary or foreign keys.

    ...

    Size wise:

    tbA has 1.2 million records

    ...

    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: joining multiple tables without a join

    The out of memory error is most likely returned by SSMS or the client application that you were using. That happens when dealing with large results sets.

    Your rewrite is correct,...

    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: How do we add a CONSTRAINT to a COLUMN to be like **/**/****

    Why don't you simply store it as a date? It'll be more effective than a constraint.

    If you seriously need a constraint, check the following article: http://www.sqlservercentral.com/articles/T-SQL/130558/

    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: Today's Random Word!

    Ray K (8/4/2016)


    Grumpy DBA (8/4/2016)


    crookj (8/4/2016)


    Ed Wagner (8/4/2016)


    Sergiy (8/3/2016)


    Revenant (8/3/2016)


    Ray K (8/3/2016)


    Luis Cazares (8/3/2016)


    Couples

    Singles

    Kraft

    Sour

    Sweet

    bitter

    IPA

    Lager

    Ale

    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: Table Summarization - Query Syntax Help

    Good, but do you understand how it works?

    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: Table Summarization - Query Syntax Help

    Do you need something like this?

    WITH CTE AS(

    SELECT * , ROW_NUMBER() OVER (PARTITION BY IDENTIFICATION_CODE ORDER BY VERSION_NO DESC) rn

    FROM [MY_TABLE]

    )

    SELECT UNIQUE_ROW_ID

    ...

    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: Variable Declaration Failure

    gfx99ne (8/4/2016)


    My understanding is, once you define the variable it stays in memory as long as same query screen is opened... and it perfectly worked for me in the past,...

    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: How to make optimizer choose an Index Seek when I have ISNULL() FUNCTION on my column referenced in WHERE condition?

    What about using an OR?

    select c1,c2,c3 From numbers

    where c3 <> 'CP-961080'

    OR c3 is null

    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: Datetime Convert SP

    Don't convert your dates into strings just to convert them again back to dates.

    Send the variables as parameters in the dynamic query. You just need to use sp_executesql

    Here's a cleaner...

    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: How do we avoid junk in the VARCHAR fields ?

    mw112009 (8/3/2016)


    I am pleased with the reply from Luis Cazares (8/1/2016).

    That works fine for me.

    No need to reply to this post anymore.

    Thanks for stopping by

    You should also try...

    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: Today's Random Word!

    whereisSQL? (8/3/2016)


    Ed Wagner (8/3/2016)


    Hugo Kornelis (8/3/2016)


    Ed Wagner (8/3/2016)


    djj (8/3/2016)


    whereisSQL? (8/3/2016)


    crookj (8/3/2016)


    Ed Wagner (8/3/2016)


    Y.B. (8/3/2016)


    Luis Cazares (8/3/2016)


    Hugo Kornelis (8/3/2016)


    Ed Wagner (8/3/2016)


    crookj (8/3/2016)


    djj (8/3/2016)


    Grumpy DBA (8/3/2016)


    djj (8/3/2016)


    Ed Wagner (8/2/2016)


    Audience

    Mob

    Mafia

    Made

    Created

    Born

    This way

    Out

    Side

    Winder

    (black) Mamba

    Venom

    Spiderman

    Arachnophobia

    Hippopotomonstrosesquipedaliophobia

    Schizophrenia (just...

    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: Help with a PIVOT

    drew.allen (8/3/2016)


    Luis Cazares (8/3/2016)


    pnr8uk (8/3/2016)


    What does the u in this line mean?

    ...

    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: Rounding in tsql

    ntreelevel (8/3/2016)


    Hi ALL,

    I have a situation where I should round a col in a table

    Ex

    Units Desired Result

    0.3 ...

    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: Help with a PIVOT

    pnr8uk (8/3/2016)


    What does the u in this line mean?

    ( 5, Sales5))u(RowId,...

    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: Help with a PIVOT

    pnr8uk (8/3/2016)


    Thank you Louis - I haven't used CROSS TAB before, makes life a lot easier than trying to use something not designed for transposing.

    This is all I need I...

    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 - 2,371 through 2,385 (of 8,731 total)