use "Google Wallet for Digital Goods API " in TAIWAN? - billing

Now I've to sign up for Google Wallet for Digital Goods (sandbox) ,
I want to set up a online billing for customer by using the Google wallet.
But when I entry this page
https://sandbox.google.com/checkout/inapp/merchant/signup.html
I can't find the "Taiwan" at "Country/Region" ,
Does it means that Taiwan can't use this service ?

At this time Google Wallet for Digital Goods is not available for Taiwan merchants. The link below has a list of eligible countries:
https://developers.google.com/wallet/digital/faq#faq-gen-02
Australia
Austria
Belgium
Canada
Denmark
Finland
France
Germany
Ireland
Italy
Japan
The Netherlands
Norway
Portugal
Spain
Sweden
United Kingdom
United States

Related

How to extract text "lower" in a div

I am trying to extract all locations from a web page that are grouped into a large id=results div.
https://www.dynacast.com/en-gb/discover-dynacast/locations
My current code produces an empty list that I cannot interact with:
browser = mechanicalsoup.StatefulBrowser(soup_config={'features': 'lxml'}
locations_page = browser.page
locations_list = locations_page.find_all("div", id="location-list")
for locations_grid in locations_list:
grid = locations_grid.find_all_next("div", class_="grid-4")
print(grid)
Output = []
My aim is to extract all the text from this locations table (North America, Europe etc.) and the locations within the continents and append it to a list. Thank you in advance.
The page is dynamic so you won't get that html from a simple request. My suggestion is just get the data in json format from the api and can use pandas to normalize it:
import requests
import pandas as pd
url = 'https://www.dynacast.com/api/sitecore/Location/LocationsByServiceAjax'
payload = {
'serviceId': '',
'contextItemId': 'a9640857-ede5-47b3-a692-1606ee151d7c'}
jsonData = requests.get(url, params=payload).json()
df = pd.json_normalize(jsonData)
Output: 1st 5 of 15 rows below
print(df.head(5).to_string())
Id LocationName LocationAddress Phone Continent Country DirectionsLink CountryUrl Content Latitude Longitude SummaryContent SalesPhone ItemUrl IsFeatured
0 7ec388a8-adfa-4652-90b7-af1a089dfba1 Dynacast Tunisia Parc d'Activités Economiques de Bizerte\r\nSite de Menzel Bourguiba II BP 130\r\n7050 Menzel Bourguiba\r\nTunisie +216 72418363 Africa Tunisia https://www.google.com/maps?daddr=Parc+d%27Activit%C3%A9s+Economiques%2BMenzel+Bourguiba%2BBizerte%2BTunisia <p>Dynacast acquired Taurus Tunisia in 2016; it is located in Menzel Bourguiba, Bizerte, Tunisia just 30 minutes from the Tunis International Airport. This 1,900m<sup>2</sup> facility specializes in precision zinc die casting. Additional details about this location include:</p>\n<ul>\n<li>12 conventional zinc die casting machines ranging from 20T to 135T</li>\n<li>Production range from 0.5g to 0.9 kg</li>\n<li>Assembly operations </li>\n<li>In-house tool maintenance and repair</li>\n<li>Wide range of secondary operations and surface finishes including milling, thread cutting, sand blasting, and tumbling</li>\n</ul> 37.1450007 9.8045612 <p>Dynacast acquired Taurus Tunisia in 2016; it is located in Menzel Bourguiba, Bizerte, Tunisia. This 1,900m<sup>2</sup> facility specializes in precision zinc die casting.</p> /en/discover-dynacast/locations/dynacast-tunisia False
1 a7138364-2693-45b7-a886-4d526a325428 Sundaram Dynacast India No. 25 A/2, Sidco Industrial Park\nNorth Phase, Ambattur\nChennai, Tamil Nadu 600098 +91.44.2625.9169 Asia India https://www.google.com/maps?daddr=No.+25+A%2F2%2C+Sidco+Industrial+Park%2BChennai%2BTamil+Nadu%2BIndia <p>Sundaram Dynacast is a 68,000 square foot facility located in Ambattur, Chennai, India. The facility is the largest zinc high pressure hot chamber die caster in this area. Below are additional details about what is offered at this location:</p>\n<ul>\n<li>19 multi-slide proprietary zinc die casting machines ranging from 2.5 to 4.5 tons</li>\n<li>7 standard zinc die casting machines ranging from 25 to 63 tons</li>\n<li>8 aluminum die casting machine ranging from 125T to 350 tons</li>\n<li>Precision tool building with in-house capabilities</li>\n<li>Wide range of secondary operations including CNC machining, tapping, reaming, drilling, and assembly available through certified/dedicated partners</li>\n<li>Wide range of surface finishes are available in-house including tumbling, polishing, shot blasting, de-burring etc.. Plating, powder coating etc. are supported through our certified partners</li>\n</ul>\n<p /> 13.1094448 80.1666248 <p>Sundaram Dynacast is a 68,000 square foot facility located in Ambattur, Chennai, India. The facility is the largest zinc high pressure hot chamber die caster in this area. </p> /en/discover-dynacast/locations/sundaram-dynacast-india False
2 a2129999-b0d7-458b-bdd4-ae8a15dd4276 Dynacast Singapore 6 Second Chin Bee Road\r\nJurong, 618773 65.6268.7644 ext. 135 Asia Singapore <p>Dynacast Singapore focuses on multi-slide zinc, conventional zinc, aluminum, and magnesium die casting. Below are additional details about what is offered at the Singapore location:</p>\n<ul>\n<li>40 multi-slide proprietary zinc die casting machines ranging from 4 to 27 tons</li>\n<li>1 standard zinc die casting machines up to 125 tons</li>\n<li>4 aluminum die casting machines up to 135 tons</li>\n<li>1 multi-slide magnesium die casting machine up to 20 tons</li>\n<li>Precision tool building with in-house capabilities</li>\n<li>Wide range of secondary operations including CNC machining, tapping, reaming, and drilling available in house and through certified partners</li>\n<li>Design, prototyping, and modeling services</li>\n<li>Wide range of finishing surfaces available including tumbling, polishing, shot blasting and thermal de-burring</li>\n</ul>\n<p>www.dynacast.com.sg</p>\n<p><br /><strong>Dynacast Singapore works with OptiMIM, utilizing state-of-the-art metal injection molding technology to create high performing small precision metal components to almost any level of complexity and at virtually any volume.</strong></p> 1.332509 103.714238 <p>Dynacast Singapore focuses on multi-slide zinc, conventional zinc, aluminum, and magnesium die casting. </p> /en/discover-dynacast/locations/dynacast-singapore False
3 f2dd9429-d9d4-4028-b8ca-227972771980 Dynacast Tokyo (Regional Support Office) Azabu Green Terrace 5F\r\nMinamiazabu 3-20-1\r\nMinato-ku, Tokyo 106-0047 +03 6859-8512 Asia Japan <p>Dynacast Tokyo is a Regional Support Office that is strategically located to help with the demand for die casting components in the Asian market. Our sales team is available to help with any of your small precision component needs. </p>\n<p><a rel="noopener noreferrer" href="http://www.dynacast.jp" target="_blank">www.dynacast.jp</a></p> 35.649991 139.7307153 <p>Dynacast Tokyo is a sales office that is strategically located to help with the demand for die casting components in the Asian market. Our sales team is available to help with any of your small precision component needs. </p> /en/discover-dynacast/locations/dynacast-tokyo False
4 a4535e88-d1c3-4489-b351-cb75c4658f61 Dynacast Dongguan No. 88 Qiufu Road District\r\nFumin Industrial Park 2\r\nDalang, Dongguan, Guangdong 523778 86.769.8222.0638 (8801) Asia China https://www.google.com/maps?daddr=No.+88+Qiufu+Road+District%2BDalang%2C+Dongguan%2BGuangdong%2BChina <p>Dynacast Dongguan is a 14,000 square meter facility that is located in the heart of the Guangdong Province. The facility delivers high quality parts to the leading manufacturing hub in Southern China and focuses on zinc, aluminum, and magnesium die casting. Below are additional details about what is offered at the Dongguan location:</p>\n<ul>\n<li>28 zinc die casting machines ranging from 2 to 250 tons</li>\n<li>20 aluminum die casting machines ranging from 125 to 350 tons</li>\n<li>4 standard magnesium die casting machines ranging from 60 to 350 tons</li>\n<li>4 aluminum & magnesium die cast machines ranging from 60 to 350 tons </li>\n<li>2 standard plastic injection machines up to 100 tons</li>\n<li>Precision tool building with in-house capabilities</li>\n<li>Wide range of secondary operations including CNC machining, tapping, reaming, and drilling available in house and through certified partners</li>\n<li>Design, prototyping, and modeling services</li>\n<li>Wide range of finishing surfaces available including E-coating, electroless nickel plating, bright chrome, black chrome, spray painting, black anodising, micro-arc oxidation, copper nickle chrome, powder coating and passivation</li>\n</ul>\n<p>www.dynacast.cn</p>\n<p /> 22.9455755 113.9313944 <p>Dynacast Dongguan is a 14,000 square meter facility that is located in the heart of the Guangdong Province. The facility delivers high quality parts to the leading manufacturing hub in Southern China and focuses on zinc, aluminum, and magnesium die casting.</p> /en/discover-dynacast/locations/dynacast-dongguan False

The data parased from the website ended up with being an empty data (bs4, python, lxml)

Hello Stackoverflow folks,
I have had a very hardtime with parsing information from a website
using Beautifulsoup and lxml.
I tried to bring the address data from "https://www1.nyc.gov/events/events-filter.html#page-1" website.
As far as I googled,
it says I need to
1. find the specific class for the information through "inspection" of the webpage.
2. need to write a code like g_data = soup.find_all("div", {"class": "event-data-detail"})
So I wrote my code as below.
import requests
from bs4 import BeautifulSoup
url = "https://www1.nyc.gov/events/events-filter.html#page-1"
r=requests.get("https://www1.nyc.gov/events/events-filter.html#page-1")
soup = BeautifulSoup(r.content)
links = soup.find_all("a")
g_data = soup.find_all("div", {"class": "event-data-detail"})
print(g_data)
and it shows the error message
Warning (from warnings module): File
"C:/Users/jotna/Desktop/Portfolio/1.py", line 7
soup = BeautifulSoup(r.content) UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for
this system ("lxml"). This usually isn't a problem, but if you run
this code on another system, or in a different virtual environment, it
may use a different parser and behave differently.
The code that caused this warning is on line 7 of the file
C:/Users/jotna/Desktop/Portfolio/1.py. To get rid of this warning,
pass the additional argument 'features="lxml"' to the BeautifulSoup
constructor.
So I fixed the code as below. (Cause a posting in stackoverflow suggested to add lxml code at the end)
import lxml
import requests
from bs4 import BeautifulSoup
url = "https://www1.nyc.gov/events/events-filter.html#page-1"
r=requests.get("https://www1.nyc.gov/events/events-filter.html#page-1")
soup = BeautifulSoup(r.content)
links = soup.find_all("a")
for link in links:
if "http" in link.get("href"):
print ("<a href='%s'>%s</a>" %(link.get("href"), link.text))
g_data = soup.find_all("div", {"span class": "address"})
print(g_data)
However it only shows empty bracket
[]
How can actually bring the address data from the website?
For your information, I uploaded the screen shot of the webpage source as well.
enter image description here
Use their json api instead of bs4, see the code below.
import requests
count = 0
for i in range(185):
count+=1
link = 'https://www1.nyc.gov/calendar/api/json/search.htm?&sort=DATE&pageNumber='+str(count)
req = requests.get(link)
for i in req.json()['items']:
address = (i['address'])
print 'Address:', address
Output
Address: Mulberry Street, Little Italy, New York
Address: Various locations Citywide
Address: SECOND AVENUE between EAST 32 STREET and EAST 33 STREET Manhattan
Address: FIRST AVENUE between EAST 92 STREET and EAST 93 STREET Manhattan
Address: CARROLL STREET between SMITH STREET and COURT STREET Brooklyn
Address: BROADWAY between WEST 114 STREET and WEST 116 STREET Manhattan
Address: CORTELYOU ROAD between RUGBY ROAD and ARGYLE ROAD Brooklyn
Address: QUEENS BOULEVARD between 70 AVENUE and 69 ROAD Queens
Address: 79 STREET between NORTHERN BOULEVARD and 34 AVENUE Queens
Address: PRINCE STREET between MOTT STREET and MULBERRY STREET Manhattan
Address: BUSHWICK AVENUE between NOLL STREET and ARION PLACE Brooklyn
Address: Alley Pond Park Adventure Center
Address: Atlantic Avenue between 4th Avenue and Hicks Street
Address: Alexander von Humboldt statue - Central Park West and 77th Street
Address: SEVENTH AVENUE between WEST 110 STREET and WEST 111 STREET Manhattan
Address: Wave Hill House - West 249th Street and Independence Avenue
Address: Broadway between Liberty Street and Rector Street
Address: Anibal Aviles Playground
Address: Myrtle Avenue between Fresh Pond Road and Wyckoff Avenue

How to get a brief description about a topic from wiki api?

I need to display a brief description about some topic. Like, when we search "India" on Google, it will show a brief description about India on the right side of the page, but that content is not an actual paragraph from wikipedia. does we get this content from wiki api?
https://www.mediawiki.org/wiki/Extension:TextExtracts#API, for example:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro=1&explaintext=1&titles=India&continue=&format=json&formatversion=2 outputs
{
"batchcomplete": true,
"query": {
"pages": [
{
"pageid": 14533,
"ns": 0,
"title": "India",
"extract": "India (/ˈɪndiə/), officially the Republic of India (Bhārat Gaṇarājya), is a country in South Asia. It is the seventh-largest country by area, the second-most populous country with over 1.2 billion people, and the most populous democracy in the world. Bounded by the Indian Ocean on the south, the Arabian Sea on the south-west, and the Bay of Bengal on the south-east, it shares land borders with Pakistan to the west; China, Nepal, and Bhutan to the north-east; and Burma (Myanmar) and Bangladesh to the east. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India's Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia.\nHome to the ancient Indus Valley Civilisation and a region of historic trade routes and vast empires, the Indian subcontinent was identified with its commercial and cultural wealth for much of its long history. Four religions—Hinduism, Buddhism, Jainism, and Sikhism—originated here, whereas Zoroastrianism and the Abrahamic religions of Judaism, Christianity, and Islam arrived in the 1st millennium CE and also helped shape the region's diverse culture. Gradually annexed by and brought under the administration of the British East India Company from the early 18th century and administered directly by the United Kingdom after the Indian Rebellion of 1857, India became an independent nation in 1947 after a struggle for independence that was marked by non-violent resistance led by Mahatma Gandhi.\nThe Indian economy is the world's seventh-largest by nominal GDP and third-largest by purchasing power parity (PPP). Following market-based economic reforms in 1991, India became one of the fastest-growing major economies; it is considered a newly industrialised country. However, it continues to face the challenges of poverty, corruption, malnutrition, inadequate public healthcare, and terrorism. A nuclear weapons state and a regional power, it has the third-largest standing army in the world and ranks ninth in military expenditure among nations. India is a federal constitutional republic governed under a parliamentary system consisting of 29 states and 7 union territories. India is a pluralistic, multilingual, and a multi-ethnic society. It is also home to a diversity of wildlife in a variety of protected habitats."
}
]
}
}

How to get all redirects to a page in Wiki API?

I need all names(redirects) for a title.
Example: for title "European Court of Human Rights" I need redirects list:
Cour européenne des droits de l’homme
European Human Rights Court
European Court for Human Rights
European court of human rights
Court for Human Rights
Strasbourg Court
Strasbourg court
ECtHR
Grand Chamber of the European Court of Human Rights
Criticism of the European Court of Human Rights
Criticism of ECtHR
European Court on Human Rights
any ideas?
request sample: http://en.wikipedia.org/w/api.php?action=query&redirects=true&titles=Strasbourg%20Court&format=xml
You can use the backlinks module and set its bffilterredir parameter to redirects:
http://en.wikipedia.org/w/api.php?action=query&list=backlinks&blfilterredir=redirects&bltitle=European%20Court%20of%20Human%20Rights&bllimit=max

Selecting only a single row per id

I'd like to get back only one row per ID, even if there are multiple rows associated with an ID.
The scenario is that the data reflects a site selling land / properties, and that for each listing, there may be multiple images associated with each ID. I need only one.
Thank You.
As requested, sample data:
RowNumber ID UserID CountryID tbl_detailsID Name Description Price AddressLine1 AddressLine2 City State Zip AddressGPS Space Amenities Policies URL DateEntered DateExpires NumViews IsCompanyProperty EnforceMinStay IsOtherSite rate_Avg isFeatured DayPrice ImageURL Name check_in check_out currency bathroom_count pet unit_size elder handicap occupancy bedroom_count LinkURL smoking unit_size_Units property_Type children Minimum_stay Minimum_stay_Unit CountryName
2 247586 1 1 161398 Beautiful Oceanfront Home in Cambria California Located on the Central Coast of California 10 minutes from Hearst Castle.
Phone 1: Toll Free (800) 240-2277
Phone 2: (805) 927-0306 (California, USA)
direct email contact: debbie (#) maisonsdecambria.com
Leopold Cove" is a beautiful Oceanfront Home located on the Central Coast of California. It has fabulous ocean views and access to the water from a private stairway. The living area has large plate glass windows that feature 180 degree views of the Pacific Ocean. A comfortable platform style bed & a warm, cozy fireplace are also located in the living area so you can relax for hours, or even days, enjoying the beauty that surrounds you. There is a full kitchen & a separate bedroom with 2 twin beds. The property also has a picnic area & places to sit, perhaps with a good book & a glass of wine while you watch the sunset. If you are a nature lover, you will enjoy the otters, seals & birdlife that we are privileged to have so close to us. During the gray whale migration times, this is a p 2183 Sherwood Drive Cambria California 93428 35.544712|-121.095444 http://www.flipkey.com/cambria-vacation-rentals/p202618/ 2012-10-01 10:52:00 2012-10-15 10:52:00 0 0 0 703 5.0 0 NULL http://images1.flipkey.com/img/photos/302459/243298/large_302459-243298-007-1346943508.jpg Beautiful Oceanfront Home in Cambria California USD 1 Ask 0 Ask Ask 4 1 http://www.flipkey.com/cambria-vacation-rentals/p202618/ Ask House Ask 0 NULL United States
3 247586 1 1 161398 Beautiful Oceanfront Home in Cambria California Located on the Central Coast of California 10 minutes from Hearst Castle.
Phone 1: Toll Free (800) 240-2277
Phone 2: (805) 927-0306 (California, USA)
direct email contact: debbie (#) maisonsdecambria.com
Leopold Cove" is a beautiful Oceanfront Home located on the Central Coast of California. It has fabulous ocean views and access to the water from a private stairway. The living area has large plate glass windows that feature 180 degree views of the Pacific Ocean. A comfortable platform style bed & a warm, cozy fireplace are also located in the living area so you can relax for hours, or even days, enjoying the beauty that surrounds you. There is a full kitchen & a separate bedroom with 2 twin beds. The property also has a picnic area & places to sit, perhaps with a good book & a glass of wine while you watch the sunset. If you are a nature lover, you will enjoy the otters, seals & birdlife that we are privileged to have so close to us. During the gray whale migration times, this is a p 2183 Sherwood Drive Cambria California 93428 35.544712|-121.095444 http://www.flipkey.com/cambria-vacation-rentals/p202618/ 2012-10-01 10:52:00 2012-10-15 10:52:00 0 0 0 703 5.0 0 NULL http://images1.flipkey.com/img/photos/302459/243298/large_302459-243298-006-1346943508.jpg Beautiful Oceanfront Home in Cambria California USD 1 Ask 0 Ask Ask 4 1 http://www.flipkey.com/cambria-vacation-rentals/p202618/ Ask House Ask 0 NULL United States
4 247586 1 1 161398 Beautiful Oceanfront Home in Cambria California Located on the Central Coast of California 10 minutes from Hearst Castle.
Phone 1: Toll Free (800) 240-2277
Phone 2: (805) 927-0306 (California, USA)
direct email contact: debbie (#) maisonsdecambria.com
Leopold Cove" is a beautiful Oceanfront Home located on the Central Coast of California. It has fabulous ocean views and access to the water from a private stairway. The living area has large plate glass windows that feature 180 degree views of the Pacific Ocean. A comfortable platform style bed & a warm, cozy fireplace are also located in the living area so you can relax for hours, or even days, enjoying the beauty that surrounds you. There is a full kitchen & a separate bedroom with 2 twin beds. The property also has a picnic area & places to sit, perhaps with a good book & a glass of wine while you watch the sunset. If you are a nature lover, you will enjoy the otters, seals & birdlife that we are privileged to have so close to us. During the gray whale migration times, this is a p 2183 Sherwood Drive Cambria California 93428 35.544712|-121.095444 http://www.flipkey.com/cambria-vacation-rentals/p202618/ 2012-10-01 10:52:00 2012-10-15 10:52:00 0 0 0 703 5.0 0 NULL http://images1.flipkey.com/img/photos/302459/243298/large_302459-243298-005-1346943508.jpg Beautiful Oceanfront Home in Cambria California USD 1 Ask 0 Ask Ask 4 1 http://www.flipkey.com/cambria-vacation-rentals/p202618/ Ask House Ask 0 NULL United States
5 247586 1 1 161398 Beautiful Oceanfront Home in Cambria California Located on the Central Coast of California 10 minutes from Hearst Castle.
Phone 1: Toll Free (800) 240-2277
Phone 2: (805) 927-0306 (California, USA)
direct email contact: debbie (#) maisonsdecambria.com
Leopold Cove" is a beautiful Oceanfront Home located on the Central Coast of California. It has fabulous ocean views and access to the water from a private stairway. The living area has large plate glass windows that feature 180 degree views of the Pacific Ocean. A comfortable platform style bed & a warm, cozy fireplace are also located in the living area so you can relax for hours, or even days, enjoying the beauty that surrounds you. There is a full kitchen & a separate bedroom with 2 twin beds. The property also has a picnic area & places to sit, perhaps with a good book & a glass of wine while you watch the sunset. If you are a nature lover, you will enjoy the otters, seals & birdlife that we are privileged to have so close to us. During the gray whale migration times, this is a p 2183 Sherwood Drive Cambria California 93428 35.544712|-121.095444 http://www.flipkey.com/cambria-vacation-rentals/p202618/ 2012-10-01 10:52:00 2012-10-15 10:52:00 0 0 0 703 5.0 0 NULL http://images1.flipkey.com/img/photos/302459/243298/large_302459-243298-004-1346943508.jpg Beautiful Oceanfront Home in Cambria California USD 1 Ask 0 Ask Ask 4 1 http://www.flipkey.com/cambria-vacation-rentals/p202618/ Ask House Ask 0 NULL United States
6 247586 1 1 161398 Beautiful Oceanfront Home in Cambria California Located on the Central Coast of California 10 minutes from Hearst Castle.
Phone 1: Toll Free (800) 240-2277
Phone 2: (805) 927-0306 (California, USA)
direct email contact: debbie (#) maisonsdecambria.com
Leopold Cove" is a beautiful Oceanfront Home located on the Central Coast of California. It has fabulous ocean views and access to the water from a private stairway. The living area has large plate glass windows that feature 180 degree views of the Pacific Ocean. A comfortable platform style bed & a warm, cozy fireplace are also located in the living area so you can relax for hours, or even days, enjoying the beauty that surrounds you. There is a full kitchen & a separate bedroom with 2 twin beds. The property also has a picnic area & places to sit, perhaps with a good book & a glass of wine while you watch the sunset. If you are a nature lover, you will enjoy the otters, seals & birdlife that we are privileged to have so close to us. During the gray whale migration times, this is a p 2183 Sherwood Drive Cambria California 93428 35.544712|-121.095444 http://www.flipkey.com/cambria-vacation-rentals/p202618/ 2012-10-01 10:52:00 2012-10-15 10:52:00 0 0 0 703 5.0 0 NULL http://images1.flipkey.com/img/photos/302459/243298/large_302459-243298-003-1346943508.jpg Beautiful Oceanfront Home in Cambria California USD 1 Ask 0 Ask Ask 4 1 http://www.flipkey.com/cambria-vacation-rentals/p202618/ Ask House Ask 0 NULL United States
7 247586 1 1 161398 Beautiful Oceanfront Home in Cambria California Located on the Central Coast of California 10 minutes from Hearst Castle.
Phone 1: Toll Free (800) 240-2277
Phone 2: (805) 927-0306 (California, USA)
direct email contact: debbie (#) maisonsdecambria.com
Leopold Cove" is a beautiful Oceanfront Home located on the Central Coast of California. It has fabulous ocean views and access to the water from a private stairway. The living area has large plate glass windows that feature 180 degree views of the Pacific Ocean. A comfortable platform style bed & a warm, cozy fireplace are also located in the living area so you can relax for hours, or even days, enjoying the beauty that surrounds you. There is a full kitchen & a separate bedroom with 2 twin beds. The property also has a picnic area & places to sit, perhaps with a good book & a glass of wine while you watch the sunset. If you are a nature lover, you will enjoy the otters, seals & birdlife that we are privileged to have so close to us. During the gray whale migration times, this is a p 2183 Sherwood Drive Cambria California 93428 35.544712|-121.095444 http://www.flipkey.com/cambria-vacation-rentals/p202618/ 2012-10-01 10:52:00 2012-10-15 10:52:00 0 0 0 703 5.0 0 NULL http://images1.flipkey.com/img/photos/302459/243298/large_302459-243298-002-1346943508.jpg Beautiful Oceanfront Home in Cambria California USD 1 Ask 0 Ask Ask 4 1 http://www.flipkey.com/cambria-vacation-rentals/p202618/ Ask House Ask 0 NULL United States
8 247586 1 1 161398 Beautiful Oceanfront Home in Cambria California Located on the Central Coast of California 10 minutes from Hearst Castle.
Phone 1: Toll Free (800) 240-2277
Phone 2: (805) 927-0306 (California, USA)
direct email contact: debbie (#) maisonsdecambria.com
Leopold Cove" is a beautiful Oceanfront Home located on the Central Coast of California. It has fabulous ocean views and access to the water from a private stairway. The living area has large plate glass windows that feature 180 degree views of the Pacific Ocean. A comfortable platform style bed & a warm, cozy fireplace are also located in the living area so you can relax for hours, or even days, enjoying the beauty that surrounds you. There is a full kitchen & a separate bedroom with 2 twin beds. The property also has a picnic area & places to sit, perhaps with a good book & a glass of wine while you watch the sunset. If you are a nature lover, you will enjoy the otters, seals & birdlife that we are privileged to have so close to us. During the gray whale migration times, this is a p 2183 Sherwood Drive Cambria California 93428 35.544712|-121.095444 http://www.flipkey.com/cambria-vacation-rentals/p202618/ 2012-10-01 10:52:00 2012-10-15 10:52:00 0 0 0 703 5.0 0 NULL http://images1.flipkey.com/img/photos/302459/243298/large_302459-243298-001-1346943508.jpg Beautiful Oceanfront Home in Cambria California USD 1 Ask 0 Ask Ask 4 1 http://www.flipkey.com/cambria-vacation-rentals/p202618/ Ask House Ask 0 NULL United States
And the Omni-query I that I am constructing to replace a few hundred lines of temp tables:
SELECT DISTINCT ROW_NUMBER() OVER(ORDER BY tbl_Properties.ID DESC) AS [RowNumber], tbl_Properties.ID, tbl_Properties.UserID, tbl_Properties.CountryID, tbl_Properties.tbl_detailsID, tbl_Properties.Name,
tbl_Properties.[Description], tbl_Properties.Price, tbl_Properties.AddressLine1, tbl_Properties.AddressLine2, tbl_Properties.City, tbl_Properties.[State], tbl_Properties.Zip, tbl_Properties.AddressGPS,
tbl_Properties.[Space],
tbl_Properties.Amenities,
tbl_Properties.Policies,
tbl_Properties.URL,
tbl_Properties.DateEntered,
tbl_Properties.DateExpires,
tbl_Properties.NumViews,
tbl_Properties.IsCompanyProperty,
tbl_Properties.EnforceMinStay,
tbl_Properties.IsOtherSite,
tbl_Properties.rate_Avg,
tbl_Properties.isFeatured,
tbl_Properties.DayPrice,
tbl_Images.ImageURL,
tbl_Details.Name,
tbl_Details.check_in,
tbl_Details.check_out,
tbl_Details.currency,
tbl_Details.bathroom_count,
tbl_Details.pet,
tbl_Details.unit_size,
tbl_Details.elder,
tbl_Details.handicap,
tbl_Details.occupancy,
tbl_Details.bedroom_count,
tbl_Details.url As [LinkURL],
tbl_Details.smoking,
tbl_Details.unit_size_Units,
tbl_Details.property_Type,
tbl_Details.children,
tbl_Details.Minimum_stay,
tbl_Details.Minimum_stay_Unit,
tbl_Countries.Name As [CountryName]
FROM [tbl_Details]
INNER JOIN [tbl_Properties] ON [tbl_Details].[detailsID] = [tbl_Properties].[tbl_detailsID]
INNER JOIN [tbl_Images] ON [tbl_Images].PropertyID = [tbl_Properties].ID
INNER JOIN [tbl_Countries] ON [tbl_Countries].ID = [tbl_Properties].CountryID
The query itself is, of course, not finished yet.
If your SQLServer version supports row_number() OVER (2008,2012 support)
select * from
(select t.*,
row_number() over (partition by id order by id) as rownumber from t
) t1
where t1.rownumber=1
Here is the SQLFiddle example
Since there's no sample data you'll need to bend this response to suit your needs
select
Listings.*, SingleImage.Column1, SingleImage.Column2
from Listings
cross apply (
select top 1 *
from Images
where Listings.ListingID = Images.ListingID
) SingleImage
That needs SQL 2005 or newer (for the "cross apply" to work)
There are ways to make it work in SQL 2000 too but they're not as efficient
try this:
SELECT TOP 1 * FROM
imagestable
WHERE imagestable.landID = <theID>
This will return the first image in the table that belongs to the property.
You can INNER JOIN this query with your property table if you want to return all property info as a single record.
In SQL Server 2005+ you can use this
use tempdb
go
create table tbl (id int, s varchar(50))
insert into tbl values (1,'qwe'),(1,'asd'), (1,'qwff'),(2,'ert'),(2,'ykf'),(3,'')
;with cte
AS
(
SELECT id,s, ROW_NUMBER() OVER (PARTITION BY id ORDER BY s ) n
FROM tbl
)
SELECT id,s
FROM CTE
WHERE n=1
drop table tbl