Forum Replies Created

Viewing 15 posts - 3,091 through 3,105 (of 8,731 total)

  • RE: How to split records evenly into 4 tables from one table is sql

    You could use the NTILE function.

    WITH

    E(n) AS(

    SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)

    ),

    E2(n) AS(

    SELECT a.n FROM E a, E b

    ),

    E4(n) AS(

    ...

    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 Code Snippets in SSMS

    john.w.walker (4/7/2016)


    I have been looking for/wanting these in SSMS since I started using it, we have had such things in Homesite forever. Glad to hear it will be in...

    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 Code Snippets in SSMS

    cstringham (4/7/2016)


    Here's a tool called Snippets Generator[/url] that I've been using that allows you to past the SQL and generate the snippet.

    It's nice, but it's still missing 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: Using Code Snippets in SSMS

    SQLvis (4/7/2016)


    Are there any examples for creating an MDX Snippet?

    I'm sorry. SSMS still doesn't support snippets for MDX queries.

    I'm not sure if Visual Studio has that capability.

    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 take string and turn into multiple rows

    Check the following article to get the best string splitter available.

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    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: Duplpicate rows appearing

    My wild guess is that you're missing some join criteria in your query. It's impossible to know without complete information.

    Another option is that employees and products are completely unrelated. 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: Creating dynamic master insert proc with identity column needing to be omited

    Why are you copying your table to a temp table?

    Why does the temp table needs an identity column?

    Why aren't you using sys.columns which has the column is_identity (and is_computed)?

    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: Temporary Table Limitations

    Koen Verbeeck (4/6/2016)


    Boooo, temp tables can be partitioned.

    So I guess BOL should be corrected?

    Temporary Tables

    You can create local and global temporary tables. Local temporary tables are visible only in 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: You are a SQL Server developer who is...

    Ed Wagner (4/6/2016)


    Iwas Bornready (4/6/2016)


    This is great. I didn't know this simple trick.

    This is a QOTD that's 3 1/2 years old.

    And this functionality is no longer guaranteed to work as...

    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: String Manipulations

    timotech (4/6/2016)


    Thanks Luis for your reply,

    but please look below at the error being generated:

    (1 row(s) affected)

    Msg 208, Level 16, State 1, Line 8

    Invalid object name 'dbo.DelimitedSplit8K'.

    Please how do i overcome...

    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: String Manipulations

    Using a recursive CTE can be very expensive. I'm using an alternative to split the string which is largely explained in this article: http://www.sqlservercentral.com/articles/Tally+Table/72993/

    Ask any questions you might have.

    DECLARE @tbl_MediumResults...

    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 extract JSON String data to C# (datagrid view)

    SQL-DBA-01 (4/5/2016)


    Hello Experts

    Do we have any standard script available to extract any unknown JSON script to C# datagrid?

    I tried with a fixed string with a designated set of columns and...

    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: Error converting data type varchar to numeric

    sks_989 (4/5/2016)


    Yes i am trying to use IN Operation with client id as list. '2,3,4' so how you can do that without creating temp table. If i put 'ALL'...

    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: Are the posted questions getting worse?

    Phil Parkin (4/5/2016)


    Gail and I are gamely persevering with this one. I think my pressure limit has been reached now, though.

    I constantly avoid that person's threads. It doesn't matter 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: Is it possible to dynamically change the value of one parameter, based upon what the user selects for another parameter?

    How are you getting the values for your fourth parameter?

    You could use a dataset with requires a parameter to assign the default value.

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