Skip to content
Advertisement

Tag: tsql

How do I select birthdays in the next 30 Days

I have a table with birthdates and I want to select all the birthdays that will come in the next 30 days. The situation is, that all the birthdays are written in the form off 1999-09-15 which means that even if I tried selecting the next 30 days, the birthdays wouldn’t show up because the year is 1999. I am

T-SQL Query Column based on filtered condition

I could do this rather easily in Python (or any other language), but I’m trying to see if this is possible with pure T-sql I have two tables: Table A has a bunch of general data and timestamps with each row Table B is considered metadata So the general data is referenced to a “RunNo”. The timestamp in table B

Concat based on sequence number

I’m trying to concat a text field based on a separate field and sequence number. For this example let’s say the fields I have are employee ID, Sequence#, and Comments. The comments field is limited …

Filter msdb.dbo.sysjobsteps.command into seperate columns

I am trying to split the msdb.dbo.sysjobsteps.command column into separate columns to show the following information: folder project dtx package A small sample of my data is below: I have tried to use the substring method, however I cannot seem to get the starting and ending number of the substring. My aim is for the following in a ssms table:

Advertisement