Forum Replies Created

Viewing 15 posts - 991 through 1,005 (of 13,879 total)

  • Reply To: ChatGPT in Visual Studio tutorial

    Interesting. Perhaps more useful for beginners than seasoned professionals.

    The following sentence is inaccurate:

     This code is using the GETDATE(); function which is not allowed in a stored procedure.

    There is no problem...

  • Reply To: Alternate SQL

    Dennis Jensen wrote:

    Phil Parkin from what I gathered they did not care about the order just the first record that has Accepted or Rejected means that the RecordId gets a 1 otherwise...

  • Reply To: Lookup table without modifying database

    As there are so few rows, I'd create a chunk of code which drops, creates and populates the table in TempDB

    DROP TABLE If EXISTS #SomeLookup;

    CREATE TABLE #SomeLookup(SomeKey...
  • Reply To: Alternate SQL

    don075 wrote:

    In my sql result, I want to create a column called RCount. Condition: For each RecNo, AccNo * If the field Reason is "Accepted", it doesn't matter what other...

  • Reply To: Creating Documentation

    If I do any significant development work, I document it myself in Confluence. This documentation remains internal, but for me has the following benefits:

    1. I can send links to people...
  • Reply To: Update a row based on MaxDate

    As the Ids are different, should the grouping be based on HorseName?

    You have been here long enough to provide DDL, INSERT scripts etc and have chosen not to. My suggested...

  • Reply To: Dates Are Missing Seconds

    Can't see why it's not working, based on the code you've provided.

    Why are you doing this in the proc?

    DECLARE @RECORD_ADD_DT datetime
    SET @RECORD_ADD_DT = @RECORD_ADD_DATE

    Seems pointless – just...

  • Reply To: Extract de-deduplicated data from a set of results with Pivot Columns

    This returns your desired results, but is it what you want?

    DECLARE @SQL1 NVARCHAR(MAX)
    = N'SELECT ri.Serial_Number
    ,UnitType = ri.Part_Number
    ...
  • Reply To: Dates Are Missing Seconds

    Good answer, makes complete sense, thanks for taking the time to write it out.

    There are a couple of points I'd like to mention, however.

    First is that SFTP is completely doable...

  • Reply To: Dates Are Missing Seconds

    Taking a step back for a moment ...

    It seems that you are running an SSIS package which calls a proc which runs BULK INSERT – a rather convoluted design. May...

  • Reply To: Extracting just the text in parenthesis

    Standard forum etiquette is to leave your question unedited and to post the solution you found, for a couple of reasons:

    1. It may help others with similar requirements
    2. People here...
  • Reply To: get Lag based on Max and previous ShipDate

    Dennis Jensen, your positivity is impressive and laudable. But the definition of insanity as "doing the same thing repeatedly and expecting a different outcome" (wrongly attributed to Einstein) is applicable...

  • Reply To: partitioning a table

    Sorry, I can't help you with this question, but I do admire the accuracy of your approximation!

  • Reply To: get Lag based on Max and previous ShipDate

    Thank you to Ken and pietlinden for your support.

    Okay Phil Parkin criticizing a questioner is poor etiquete. Instead if you feel their question needed more information simply state that without being condescending....

  • Reply To: get Lag based on Max and previous ShipDate

    Bruin wrote:

    My query finds Min and Max to determine Lag, but I need to find the lastest Shipdate date(max) and then previous shipdate to determine lag  --> remove the Min(shipdate).

    I...

Viewing 15 posts - 991 through 1,005 (of 13,879 total)