Truncate tables where Referential Integrity exists
This script can be useful in test and dev environments to quickly clear tables via the truncate command where referential integrity exists.
2024-05-15 (first published: 2024-05-02)
377 reads
This script can be useful in test and dev environments to quickly clear tables via the truncate command where referential integrity exists.
2024-05-15 (first published: 2024-05-02)
377 reads
Mistral 7B is the first foundation model from Mistral AI, supporting English text generation tasks with natural coding capabilities.
2024-04-03 (first published: 2024-03-21)
227 reads
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 […]
2024-03-21 (first published: 2024-03-19)
49 reads
Any user who has a backend in AWS can leverage python to query the database and generate insights on the data by leveraging bedrock and langchain library
2024-03-21
255 reads
In this script we will leverage the capabilities of Amazon Bedrock's Generative AI service to author SQL statements.
2024-02-03
297 reads
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 […]
2023-11-29 (first published: 2023-11-21)
660 reads
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 […]
2023-09-29 (first published: 2023-09-18)
1,261 reads
Csv files must frequently be joined. It would be fantastic if we could connect CSV files using the power of SQL. This script accomplishes that.
2023-09-18 (first published: 2023-08-28)
1,492 reads
Very often there is a need to create test data manually. This script will provide a mix of names that will make more sense rather than randomly generating meaningless names.
2023-09-11 (first published: 2023-08-24)
596 reads
This script creates an external table in Synapse.
2023-08-21 (first published: 2023-07-26)
796 reads
Ready to dive into the world of SQL? Whether you're dreaming of a lucrative...
This comic was retweeted into my timeline on Twitter (I refuse to call it...
By Steve Jones
Recently I’ve been looking at archiving some data at SQL Saturday, possibly querying it,...
Hi everyone, I have been asked to investigate storing Excel files in Sql Server...
My agency has been using the combo of on-premises SQL Server for the back...
Development Environment I am learning how to use pyodbc and accessing database in SQL...
I want to enable two trace flags, 4199 and 4137, for a single query. How should I do this:
-- A SELECT a.AddressID , a.AddressLine1 , a.AddressLine2 , a.City , a.StateProvinceID , a.PostalCode , p.FirstName , p.LastName FROM Person.Address a INNER JOIN person.Person AS p ON p.rowguid = a.rowguid WHERE City = 'SEATTLE' AND PostalCode = 98104 OPTION (QUERYTRACEON 4199, 4137); -- B SELECT a.AddressID , a.AddressLine1 , a.AddressLine2 , a.City , a.StateProvinceID , a.PostalCode , p.FirstName , p.LastName FROM Person.Address a INNER JOIN person.Person AS p ON p.rowguid = a.rowguid WHERE City = 'SEATTLE' AND PostalCode = 98104 OPTION (QUERYTRACEON 4199, QUERYTRACEON 4137); -- C SELECT a.AddressID , a.AddressLine1 , a.AddressLine2 , a.City , a.StateProvinceID , a.PostalCode , p.FirstName , p.LastName FROM Person.Address a INNER JOIN person.Person AS p ON p.rowguid = a.rowguid WHERE City = 'SEATTLE' AND PostalCode = 98104 OPTION (QUERYTRACEON 4199), (QUERYTRACEON 4137);See possible answers