Scripts

Technical Article

Node Script to call Salesforce from external system

Salesforce runs batch jobs in its server which takes resources and time and creates a burden on the overall server. Hence often times there is a need for a mechanism to call Salesforce system from external system. Calling salesforce from external system results in less burden on the salesforce server and faster processing. By leveraging […]

5 (1)

You rated this post out of 5. Change rating

2024-03-21 (first published: )

92 reads

Technical Article

Simple T-SQL implementation for running SSRS subscriptions.

I created this stored procedure to be able to run SSRS subscriptions using T-SQL code instead of adding a component in the SSIS package with the subscription id. Let's say we have a set of report subscriptions named like this: ClientReport1, ClientReport2, ClientReport3. To run them using the stored procedure, all we need is this […]

5 (1)

You rated this post out of 5. Change rating

2023-11-29 (first published: )

857 reads

Technical Article

How to Move a Table into a Schema in T-SQL

To move a table into a schema in T-SQL, you can use the ALTER SCHEMA statement along with the TRANSFER option. Here are the steps to do this: Assuming you have an existing schema named "NewSchema" and a table named "YourTable" that you want to move into this schema: Open SQL Server Management Studio or […]

You rated this post out of 5. Change rating

2023-09-29 (first published: )

2,660 reads

Technical Article

Validating different types of data like Gmail, Outlook email addresses, phone numbers, and URLs

Validating different types of data like Gmail, Outlook email addresses, phone numbers, and URLs in SQL can be a bit challenging since SQL is primarily used for data manipulation in databases and not for complex data validation. However, depending on the database system you are using, there might be some limited string manipulation functions available that can help you perform basic validation checks.

2.33 (3)

You rated this post out of 5. Change rating

2023-07-28

307 reads

Blogs

SQL Data Pipelines: The Ultimate Guide to Streamlining Your Data Flow

By

Want to build a data analytics foundation that transforms raw data into valuable business...

Using SQL Compare in Read-Only Databases

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

T-SQL Tuesday #179 Roundup: The Data Detective Toolkit

By

Earlier this month, I hosted the monthly T-SQL Tuesday invitation in which I asked,...

Read the latest Blogs

Forums

Concatenating Multiple Row Values into a Single Comma-Separated List

By Sukhdevsinh Dhummad

Comments posted to this topic are about the item Concatenating Multiple Row Values into...

From each string extract Numbers following a '#' and create separate row

By SqlRookie

Hi there, I've tried CROSS APPLY, PATINDEX and many other functions, but can't nail...

Looping SQL Agent Job

By paul.farnell

What is the best way to continually loop a SQL Server Agent Job? I...

Visit the forum

Question of the Day

The LAGing data

I have some simple sales data in a SQL Server 2022 database that looks like this:

TransactionDate SalesAmount
2023-01-15      1200.00
2023-02-22      1500.50
2023-03-10      900.75
If I run this query, what are the sales growth amounts returned?
SELECT
  ms.TransactionDate
, ms.SalesAmount
, ms.SalesAmount - LAG (ms.SalesAmount, 1) OVER (ORDER BY ms.TransactionDate) AS SalesGrowth
FROM dbo.MonthlySales AS ms;

See possible answers