Skip to content
Advertisement

Tag: sql-server-2012

How to validate dates are in the format of YYYYMMDD

I have a date column having thousands of rows in the format of YYYYMMDD. I have to validate that all the rows are in the correct date format. If there is any row off from the desired format or in any means (say null) the row should be returned in the result. I have the following sample data: Since NAN

Condition on SQL Server query

The below SQL query is in a SQL Server 2017. I want when the value of UtenteCliente.CostoFatturazionePersonalizzato is 0 or null is configured with the value of Utente.CostoFatturazione, to do this I use the query below but the result always returns null. How can I do this? SQL Query: Answer You can use CASE expression instead IIF():

Moving Data from SQL Server to Excel, Views or Query?

I have an Excel spreadsheet that pulls data from a view (that’s pulling from another view) in SQL Server, this was created by someone other than myself. Due to recent changes in how we are storing data in SQL Server, the views no longer actively reflect the data needed. The current Excel spreadsheet use a command to simply pull the

Advertisement