Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)

  • RE: Stored procedure parameters

    George Vobr - Sunday, April 2, 2017 6:00 PM

    The syntax CREATE PROCEDURE statement allows you to create output_only procedure. The following stored...

  • RE: (Re)Sorting records

    :satisfied:

    In addition to Dixie's reply I'd like to mention that this is also a programming (not just SQL) lesson. :smooooth:

    Thanks!

  • RE: (Re)Sorting records

    No problem. I appreciate and thank you for your time and efforts! I'll keep thinking about this and let you know about any progress.

  • RE: (Re)Sorting records

    Sorry but it's not done yet 🙁

    do this

    truncate table newp

    insert into NewP

    select * from

    (

    select 5 id, 'E' name, 2 sort

    Union all

    select 11 id, 'K' name, 3 sort

    Union...

  • RE: (Re)Sorting records

    No, I won't have more than 30 rows.

    In fact, the newP table will be a temp/variable table and I know it's not recommended to store more than 100 records.

  • RE: (Re)Sorting records

    YES!

    That's what I'm looking for.

    THANKS!!!!

    I was thinking about a similar solution ... but you gave it before me 🙂

    Why did you use coalesce instead of isnull because there...

  • RE: (Re)Sorting records

    Yes

  • RE: (Re)Sorting records

    You're right.

    thanks!

  • RE: (Re)Sorting records

    Imagine that you have a webpage where you can see the list and decide to move the products (re-sort them). So when you press "SAVE" button: E is on position...

  • RE: JOIN technique

    Hi

    Let's consider next case:

    Tables: Sales 1<--> m Products 1<-->1 Country

    Select *

    FROM

    Sales s

    inner join Products p on s.ProductId = p.ProductId

    inner join Country...

  • RE: JOIN technique

    Hi,

    Sorry, I should have used

    Sales s

    INNER JOINProducts p on c.ProductId = p.ProductId

    not CustomerId ...

    Thanks,

    Luigi

  • RE: Display COUNT(*) but ONLY TOP 100

    Hi DavidP-340734,

    Did you ever try your solution?

    I've tested on a table with more the 3 mil records and my solution is more faster than yours.

    Good luck!

  • RE: Split string into table, separator can be more than 1 char

    Hi Lynn,

    Yes, I saw you used Jeff's split method.

  • RE: Split string into table, separator can be more than 1 char

    Hi,

    You're right, using the Tally table is faster:

    using this parameter:

    DECLARE @Parameter VARCHAR(8000)

    SET @Parameter = REPLICATE('Element01,Element02,Element03,Element04,Element05,',159)

    So I got next execution times (running the same script several...

  • RE: Display COUNT(*) but ONLY TOP 100

    Hi Mike1024,

    "how do I display 5000"? ... well in my example I display 54977 .. maybe I should have written 54977 instead of 5000.

    I hope you got the idea.

    Hi gorr-688214,

    In...

Viewing 15 posts - 1 through 15 (of 15 total)