
use Sample_USA
go

select NAME_2, geog from dbo.Counties
where NAME_1 = 'Oregon'

select NAME_2, geog.STAsBinary() from dbo.Counties
where NAME_1 = 'Oregon'

-- ToString() also produces WKT
select NAME_2, geog.STAsText() from dbo.Counties
where NAME_1 = 'Oregon'

select NAME_2, geog.AsGml() from dbo.Counties
where NAME_1 = 'Oregon' 

-- use geo data type produces spatial results tab
select NAME_2, geog from dbo.Counties
where NAME_1 = 'Oregon'

select NAME_2, geog from dbo.Counties
where NAME_1 = 'Oregon'
union all
select NAME_1, geog from states