Forum Replies Created

Viewing 15 posts - 3,046 through 3,060 (of 8,731 total)

  • RE: Can not get results to insert into table

    Do you mean like using INSERT INTO YourTable SELECT ....?

    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: BCP Import Help

    In the format file, you should define the format of the data file, not the table.

    Here's what I used to make it work:

    11.0

    4

    1 SQLBIGINT 0 8...

    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: Please help me improve the performance of this query

    You're also calling a function twice. If that's a multi-statement table function, that might be causing problems.

    Your clause "and vru.Full_User_Name0 IN (@Assignee)" is causing that your left join becomes an...

    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: Print Object Explorer panel?

    johnwalker10 (4/13/2016)


    Shipping Tool can take screenshots of an open window, rectangular area, a free-form area, or the entire screen.

    SnippingTool.exe is located in the System32 folder but it can also...

    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: nested query - bug?

    lotusnotes (4/14/2016)


    Ok. Thanks guys.

    If you use an alias od.orderid it still lets you do it & the overall code still works & returns no rows.

    You would hope to...

    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: Reassign sequential group numbers to results of DENSE_RANK?

    Have you tried a Quirky Update? That would be my choice.

    Reference: http://www.sqlservercentral.com/articles/T-SQL/68467/

    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: Count total in a rolling 12 month period?

    kawi6rr (4/13/2016)


    I'm sorry I tried to be as clear as I could but it looks like I could have explained better.

    Table

    Is a table that's already created and filled with the...

    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!

    Ed Wagner (4/13/2016)


    crookj (4/13/2016)


    jeff.mason (4/13/2016)


    Manic Star (4/13/2016)


    Ed Wagner (4/13/2016)


    ThomasRushton (4/13/2016)


    jeff.mason (4/13/2016)


    Revenant (4/13/2016)


    Hugo Kornelis (4/13/2016)


    djj (4/13/2016)


    crookj (4/13/2016)


    Hugo Kornelis (4/13/2016)


    Ed Wagner (4/13/2016)


    Grumpy DBA (4/12/2016)


    crookj (4/12/2016)


    Bagger

    Vance

    Lance

    Carrier

    Kitty Hawk

    Wright

    Rong

    China

    Grove

    Dictionary

    (of Music & Musicians...)

    Thesaurus

    Stegosaurus

    Jurassic

    ankylosaurus

    Club

    golf

    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: Count total in a rolling 12 month period?

    How do you get that output from that data?

    Here's what you seem to be trying to do. Please notice on how I posted the sample data so you can do...

    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: nested query - bug?

    This is not a bug. It's a feature.

    Allowing to reference columns from the outer query allows you to create correlated subqueries. This is specially important when using EXISTS or APPLY.

    Due...

    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: Multiple Table Query

    Help us help you. Please post DDL and sample data in a consumable form. Learn how to do it from the articles linked in my signature.

    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: Set end date for a row to start date of next row minus 1 day

    smw147 (4/13/2016)


    drew.allen (4/12/2016)


    smw147 (4/12/2016)


    Thanks for that 🙂 Never heard of LEAD before. Very interesting.

    LEAD and LAG were introduced with SQL2012. You won't be able to use them if...

    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: Re-Write SQL Query to a View

    If you want to pass parameters, you don't need a view. You need an inline table-valued function (iTVF).

    CREATE FUNCTION SomeFunctionName(

    @Year int

    ,@Period int

    ) RETURNS TABLE AS

    RETURN

    SELECT

    MAX(GLChartOfAccounts.GLChartOfAccountId) AS GLChartOfAccountId,

    SUM(DTbl.OpenBalance) AS OpenBalance,

    SUM(DTbl.ThisPeriodDebits)...

    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: find date value from file name

    dallas13 (4/13/2016)


    Sure I dont but not a c# or VB developer so hard to troubleshoot if something goes wrong ther. but thanks all.

    I'm not a C# or VB developer either,...

    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: A deadlock issue that killing me dead

    Avoid threading if you're writing to the same table. Leave that option to SQL Server by the use of parallelism.

    Also, align the clustered indexes of temp tables with perm table.

    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 - 3,046 through 3,060 (of 8,731 total)