Using SQL to read from a web service

Recently, I needed to find correct addresses for physical locations that I had only latitude and longitude.   The general process to do this follows:

script to PROVE OUT the process for generating good addresses from JEA bad addresses thru the provided lat/long
(assumes, hopes the lat/long are good)
1. TMP table: Create a table of the addresses, lat and long
2. XY PROJECTION: create CTE using function on each row of tmp table to fill in XY projection
3. XY PROJECTION–>URL: create CTE with URL w/XY
4. CALL FOR RE: Using prior CTE… create CTE using function on each row to fill in new (correct) RE Continue reading “Using SQL to read from a web service”

Government Transparency Powered by SharePoint 2013 and Sql 2012

sql Saturday #391
Click me to register

Hey, everyone! There’s a great event here in Jacksonville, Florida. It’s coming in May.  Saturday, 9 May, to be specific.  It is like a mini Tech-ed. Free Food. Great Technical presentations.  Click the picture to the right to register!

Lots of networking. Fellowship. Swag. After hours party. What could be better than that? I will be speaking on a “Government Transparency Powered by SharePoint 2013 and Sql 2012”.

Reading an SSAS cube thru SQL using MDX

Do you need the ability to read a cube, but you want to read it thru SQL?  And, why would you do this?  Well, for example, suppose you wanted to email the results of a certain MDX query…and you didn’t want to set up SSRS to do this.  (SSRS would be a fine method, but you do have to set it up and create the report etc.)  Suppose you were simply more comfortable using a SQL Server Agent job to do this task for you.  Continue reading “Reading an SSAS cube thru SQL using MDX”

Character selection by location in a string

Suppose you had a 4 character field (prefx), and you wanted to find all those records where the 2nd and 4th characters were numeric, with the other two being alphabetic.  Here’s a neat, simple solution:

select * from TableName where prefx like‘[A-Z][A-Z][A-Z][0-9]’