Large posts full of code not allowed anymore?

  • Several times now, I've seen a post asking for a solution. I've replied, and posted comprehensive code for the solution, and the post does not add to the thread, but i don't get any error like post too long, or anything.

    I've tried putting the code in code blocks, and just plain pasting it inline.

    in a specific example today, i tried to paste some code related to splitting data into multi row data with Jeff Moden's Tally, from code i saved from March 2009!

    besides my description and pre-amble, what i pasted into a code block was 132 lines, and 5,951 characters.

    I used to post prolifically here, and find myself with more free time lately, so i was trying to contribute a bit.

    What am i missing? is there a new technique we have to use to post  larger scripts?

    • This topic was modified 1 hour, 11 minutes ago by Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Something has changed in the last week or so. For months, I have not been receiving any notifications of new topics or replies to my posts, but a few days ago, the notifications started arriving again.


  • Edit: this posted with a code block, so i think the issue is size related.

    yes I've seen the same, effectively, notifications restart again recently, after a long hiatus of just receiving newsletters, but not forum i think i am bumping up against a max post size, that years ago did not exist. i thought it was things like powershell scripts not allowed, or left square brackets in code being considered markdown, but i don't see a direct correlation so far to what i post

    for example, i am trying a code block with just select @@version as [VersionInfo] below. if it fails, i will repost as Second Attempt.

    select @@version as [VersionInfo]

    • This reply was modified 1 hour, 2 minutes ago by Lowell. Reason: confirming this posted

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I'm going to attempt to post a 64-line script I first posted as a response in a thread months ago, as a SQL code block.

    DROP TABLE IF EXISTS #product;
    DROP TABLE IF EXISTS #VendorRank;

    --Product table and data
    CREATE TABLE #Product
    (
    ProductID INT
    , ProductSKU INT
    , VendorID INT
    );

    INSERT #Product
    (
    ProductID
    , ProductSKU
    , VendorID
    )
    VALUES
    (10, 100, 1)
    , (11, 100, 2)
    , (12, 100, 3)
    , (13, 200, 3)
    , (14, 300, 1)
    , (15, 400, 1)
    , (16, 400, 2)
    , (17, 400, 3)
    , (18, 500, 1)
    , (19, 500, 3);

    --Vendor rank table and data
    CREATE TABLE #VendorRank
    (
    VendorID INT
    , AssignedRank INT
    );

    INSERT #VendorRank
    (
    VendorID
    , AssignedRank
    )
    VALUES
    (2, 1)
    , (1, 2)
    , (3, 3);

    --Get ranked results
    WITH ranked
    AS (SELECT p.ProductID
    , p.ProductSKU
    , p.VendorID
    , vr.AssignedRank
    , rn = ROW_NUMBER() OVER (PARTITION BY p.ProductSKU ORDER BY vr.AssignedRank)
    FROM #Product p
    JOIN #VendorRank vr
    ON vr.VendorID = p.VendorID)
    SELECT r.ProductID
    , r.ProductSKU
    , r.VendorID
    , r.AssignedRank
    , r.rn
    FROM ranked r
    WHERE r.rn = 1
    ORDER BY r.ProductSKU;

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

You must be logged in to reply to this topic. Login to reply