与SQL Server不同,当您使用ODBC连接连接到数据库时,参数支持是不同的。您不能使用命名参数,而必须使用import bs4
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
my_url = 'https://carta-natal.es/astros_ahora.php'
# Grab the url and download it
uClient = uReq(my_url)
# Reads the content and storage it
page_html = uClient.read()
# Close the connection
uClient.close()
# html parsing
page_soup = soup(page_html,"html.parser")
print(page_soup.h1)
语法。
为了容纳多个值,您可以将它们连接为单个字符串,并使用?
语句搜索它们。但是,这是无效的。另一种方法是使用一个函数将这些值拆分为一个内联表。
在PostgreSQL中,您可以使用如下表达式:
like
然后在数据集属性的“参数”选项卡下,使用类似以下的表达式来连接值:
inner join (select CAST(regexp_split_to_table(?,',') AS int) as filter) as my on my.filter = key_column
换句话说,该报告将这些值连接到一个逗号分隔的列表中。数据库将它们分成整数表,然后内部连接值。
本文链接:https://www.f2er.com/3157074.html