Forum Replies Created

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

  • Reply To: what if my last resort on extracting excel is at the cell level?

    If you're not adverse to watching a video, there are several tutorials showing how to read a specific cell range from an Excel sheet available on youtube.com.

    For example this short...

  • Reply To: Are the posted questions getting worse?

    Eirikur Eiriksson wrote:

    One has to laugh, RTO no longer stands for Recovery Time Objective, now it means Return To Office ๐Ÿ˜Ž

    Those ever-changing meanings of common TLAs are giving me a headache.

    Does...

    • This reply was modified 1 month ago by  kaj. Reason: Typo
    • This reply was modified 1 month ago by  kaj. Reason: context
  • Reply To: Call dynamic sql storedprocedure from SSIS execute sql task

    Phil Parkin wrote:

    komal145 wrote:

    I copied the  above sql ( as it is )....in a ssis variable and called it from execute sql task....it is still not working ๐Ÿ™

    You misunderstood my suggestion.

    Create...

  • Reply To: Converting job_id to join to another table.

    Just a thought...

    Depending on your need for data, you might also consider using the system view sys.dm_exec_sessions instead the somewhat unwieldy stored procedure sp_who2 as the basis for your query:

    Either

  • Reply To: Converting job_id to join to another table.

    Apologies I seem to have miss read the text way it was being converted.

    As you have the job hex in varchar from the substring, converting that to the GUID and...

    • This reply was modified 2 months ago by  kaj.
  • Reply To: Converting job_id to join to another table.

    There isn't really a need to use that scalar function for the conversion.

    This will also work:

    SELECT t.SPID, t.Status, t.ProgramName, j.name AS JobName
    FROM @Table t
    LEFT OUTER JOIN msdb.dbo.sysjobs...
  • Reply To: Pivot Help

    Arrgh! At least in my browser the output from my post above isn't rendered correctly, even though I have used the Plain type format and it shows correctly when I...

  • Reply To: Pivot Help

    If you don't want to do a group by pivot, but simply want to place the price in a separate column, something simple like this might work for you:

  • This reply was modified 2 months ago by  kaj.
  • This reply was modified 2 months ago by  kaj.
  • This reply was modified 2 months ago by  kaj.
  • This reply was modified 2 months ago by  kaj.
  • This reply was modified 2 months ago by  kaj.
  • Reply To: Concatenating Multiple Row Values into a Single Comma-Separated List

    drew.allen wrote:

    Sukhdevsinh Dhummad wrote:

    Thanks for the critical feedback! I appreciate your point, but the intent of my script wasn't to compare performance between the two methods. It was focused on providing...

  • Reply To: Deduplicating rows by choosing the row with the shortest string

    Maybe something like this?

    declare @Teams table (
    TeamCode varchar(10),
    Description varchar(30)
    )

    INSERT INTO @Teams (TeamCode, Description)
    ...
  • Reply To: query help

    Bruin wrote:

    Wow that seems very fast...

    I'm not sure why some of this code exists and its logic wasn't up front when developed

    Much appreciated for your reply.

    Thanks, but... on second thought...

  • Reply To: query help

    ... also, why do you group by d.attValue when you have a MAX() on that column in the SELECT?

  • Reply To: query help

    I find it curious that you use so many self-joins only to do some sums. I would probably move the additional criteria from the WHERE section to CASE statements in...

  • Reply To: Error loading multiple CSV files in SSIS

    Might be a driver issue. Are you using an OLEDB driver or something else? 32 bit or 64 bit?

  • Reply To: How can I tell if an UPDATE command updated any rows?

    Michael J. Swart has a nice write-up about different kinds of upserts (and what's good and what's not):

    https://michaeljswart.com/2017/07/sql-server-upsert-patterns-and-antipatterns/

     

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