Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL data selection command

$
0
0

Hello Spice Works Community,

I have a SQL database that contains a table which has a column listing dates in the following format "Jan-2016, Feb-2016, etc"

The list has goes back a number of years, I am looking for a SQL command which will return month results for 2016 and 2015 only "Jan-2015 through to Jul-2016".

The actual DB is on Azure and I am pulling information through from one of the tables to an Excel Spreadsheets to present the information in a more readable format for some of our users. Within the Excel spreadsheet I have created a Workbook connection, then under the definitions tab I am attempting to run the following SQL command;

SELECT Month
FROM "Submissions_Staging"."dbo"."Period"
WHERE MonthLIKE '%2015'
OR Month LIKE '%2016';

When this is run literally nothing happens. Anyone have any ideas, I am sure it's something...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>