Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Daily Coping Tip

Reflect on what you accomplished this week

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

Complex Searching

Searching for data in our systems is sometimes hard. If you've ever needed to generically search a lot of text, it's not easy to write code to do this in an efficient manner. If you get into full-text searching, likely you would look beyond SQL Server as the full-text indexing in SQL Server isn't great.

What if you had to search in more complex data? Imagine that your users were looking for words in audio files, or they wanted to find images that matched others. Those are even more complex searches, and I expect that few people have had to deal with this, though I do expect it to be something more people will do more across time in some applications.

I saw an article about Google Lens coming to the desktop, allowing you to clip an image and then search for similar items. While I haven't used this for searching, my kids have. Often they are looking for matches of a product or a place, and they like being able to search for related images.

Image search is interesting, as you are looking to match patterns of numbers, but not exact matches. The idea of fuzzy matching parts of an image, which is a series of numeric values,, but not all of them, has to be a very challenging process. I would find this even more complex than doing a -speech-to-text translation from audio and searching for words. Many of us would know how to do produce a solution for searching audio recordings.

The theory of how to search for images based on another image is a complex field of study. I don't pretend to know how this might work, and I'm not sure I care. If I have a need for this, I wouldn't expect to need to understand how the system works as this would really be an API call of some sort. I might need to work with the API and understand how to better use it to produce the results my clients need, but that might be the most I'd care about.

As with a lot of deeply technical things, I care more about practical applications. On a recent trip, I watched my wife use Google Lens to translate some menus, something I hadn't considered. I usually would type in text and look for meanings, but using the image is much easier. I expect we'll see the need for more complex searches in the future, but for most of us, it will be another service we consume without really understanding how it works, which is probably fine in these situations.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents
SQLServerCentral Article

Iteration and Conditional Activities in Azure Data Factory

arindamxs from SQLServerCentral

Learn about the different iterator activities in Azure Data Factory.

External Article

Working with SQL Server identity columns

Additional Articles from SimpleTalk

SQL Server identity columns are easy to add to a table, but you must understand how they work to use them effectively. In this article, Greg Larsen explains the nuances of SQL Server identity columns.

External Article

Flyway with MariaDB for Those of a Nervous Disposition

Additional Articles from Redgate

This article from Phil Factor will get you up and running quickly with Flyway migrations on MariaDB or MySQL databases, from PowerShell.

Blog Post

From the SQL Server Central Blogs - Do Full Backups Break Log Shipping?

Kevin3NF from Dallas DBAs

TLDR: Nope. Keep on doing your full backups. Make sure that any databases you Log Ship are NOT also doing log backups in your SQL Maintenance Plans, Ola Jobs,...

Blog Post

From the SQL Server Central Blogs - 3 Important Queries for Testing Your Availability Group Endpoints

SQLRNNR from SQL RNNR

In this article, I have shown the importance of performing three different validation tests against your Availability Group Endpoints. Each test also demonstrates what can be run in the...

SQLServerCentral Article

CData Connect: Derived Views and Query Federation

JerodJ from SQLServerCentral

Big data plays a key role in promoting both manufacturing and scientific development through industrial digitization and emerging research. Integrating big data demands scalable tools for enabling not only big data ingestion and curation but also efficient large-scale exploration and discovery. There is a solution to scale up to large volumes of data distributed across multiple […]

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

SSIS Catalog Objects

What types of objects are stored in the SSIS Catalog?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Change Tracking Default Retention

I turn on change tracking for a database with this code in SQL Server 2019:

ALTER DATABASE Sales
SET CHANGE_TRACKING = ON

What is the default retention period for changes?

Answer: 2 days

Explanation: The default retention period is 2 days. Ref: ALTER DATABASE - https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-set-options?view=sql-server-ver15  

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2017 - Development
Creating appropriate data type from varchar(max) - This is something I am thinking someone may have done already. Basically we have data loader which loads data from any source but the data type in the table will always be varchar(max). if it is db to db transfer then the table will have correct data type as source. This was perhaps designed long […]
SQL Server 2016 - Development and T-SQL
Extract data from XML field - Hello, I have a SQL view with a column called GlobalCountryRegionXML. Here is an example of a value stored in this field:- United Kingdom UK-IE United States NORAM From this, I would like two further columns showing the following results (in the same single row) separated by a comma:- […]
How to get YYYYMMDDHHMMSS - This is getting the data I need, but not the format. select replace(convert(varchar, getdate(),101),'/','') + replace(convert(varchar, getdate(),108),':','') 10212021102437 I want YYYYMMDD before the time portion. Thanks.
SSIS File System Task - Permission Inheritence - I have an SSIS package which outputs a flat file to the file system into a "staging" folder. The package then runs a File System Task to move this file from the Flat File Destination "staging" location to another "collection" path specified in an SSIS Parameter. The package works successfully. However,  the resulting file that […]
Alter Procedure With Invalid Object Name - We are trying to update a stored procedure to reference objects that don't yet exist in preparation for when they will exist. The problem is SSMS doesn't like that and gives the error that there are invalid objects. Is there a way to trick it into allowing the invalid references?
Development - SQL Server 2014
Conversion failed when converting the varchar value to data type int. - Hi, I've tried using cast but can't seem to get the syntax right.  Here is the query below: SELECT PurchaseOrder AS Customer, [JobNumber] AS ROM#, Counter_Type as Countertop, ((Length/12)*(16)) as Price, LnFt AS Reason, CASE WHEN LnFt = '1' THEN ' SHIPPING DAMAGE' WHEN LnFt = '2' THEN 'SHIPPING SHORT ON DELIVERY' WHEN LnFt = […]
SQL 2012 - General
named pipes connect error - Inherited an estate. Just trying to logon to one of the SQL servers.  It's not a named instance.  Trying to connect via SSMS & osql (local to the SQL box) - connecting with either: SSMS (windows user onto hostname, hostname,1433 or hostname\mssqlserver).  It's windows auth only. osql -S. -E osql -S hostname -E osql -S […]
How to make row number start by 1 instead of 0 when make union all? - I work on SQL server 2012 i face issue i can't arrange rows from 1,2,3,4,5 current arrange is 0,1,2,3 for rownumber i need row number start by 1 then 2,3,4,5,etc select H.lifecycleid,H.ZPartID,H.ZLC,H.ProccessingDate,ROW_NUMBER() OVER(Partition by H.ZPartID ORDER BY H.ProccessingDate DESC) AS Row_Number into #arrangeHistory from #TempLC t inner join parts.LifeCycleHistory H on H.ZPartID=t.ZPartID --3---get data related […]
SQL Server 2019 - Administration
Need the (default) port to connect - why is this not implicit. - So I have 2 instances (1 x 12, 1 x 19). Both have the default port set to 1433.  Same settings on each. I connect in from a central server. On one, I must specify the port the other I don't need to. Just wondering why.  I would have presumed the default port is implied? […]
SQL Server 2019 - Development
Rank values based on dates (grouping) - Hello friends, I need some help. I need to rank all titles for each week. Later on, I need to pull top20 titles for each week in PowerBI, however for some reason it doesn't let me to do it there (it pulls top20% only). I am trying to find a way around and group it […]
Replace apostrophe in user input field - I have an Access front end with SQL backend.  The user input field is text. He inputs: don't mess up. When I run the SQL update to update the field I get the SQL injection error. My code: strSQL =  _ "UPDATE [Orders] " & _ " SET [Orders].[Comment] =  '" & Me.Comment & "' & _ " WHERE [Orders].[OrderId] = '" & strOrderId & "';" DoCmd.RunSQL strSQL The Comment text […]
DATEDIFF with GETWEEK worth of data - I have such an issue. I have units, on sale date and also how many weeks the unit is on sale. However, my current formula with DATEDIFF grabs only dates that are from '09-20' and some from '09-21' (if we take a week of 1 month example), but I need to change it so it […]
Update field based on next 5 rows - Hi, I have table below: ID   Postcode   PostcodeNext 1       LL11 2       LL12 3       LL13 4       LL14 5        LL15 6       LL16 . . . I need to update PostcodeNext column for each row in database with next 5 postcodes as string, so ie […]
Reporting Services
Please help with grouping totals and details - I am trying to get the same layout going in ssrs as in the picture below. Basically there is a parent group on business area/line and then it groups on event type too and does the totals on the top line. right underneth the totals for the event type it goes into the detail to […]
SQL REporting SErvices 2017 , how do I deny permission to users - I set site level and user level Security entry for domain users, but still user is able to access the repots.. How do I mitigate this... i want to give access to only few user groups and not all user groups..
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -