内联表值函数(Inline table valued function)
我需要创建一个表函数,在第1列中生成一个指定数字的参数,始终从1开始。在第2列中,如果第1列可以被5整除,则会说'Div5',否则为
NULL
。以此为例。 我指定第1列将在5处停止,最终结果将如下所示;
1 NULL
2 NULL
3 NULL
4 NULL
5 Div5
我可以创建函数,但我不知道如何创建条件第一列,或者如何说第2列除以5是一个整数然后'Div5'如果它是小数然后是NULL;
create function MyFunction () Returns @Division Table (Ind int , Div5 varchar(30)) AS begin Insert Into @Division (Ind, Div5) select ???,??? Return; End;
我希望这能给出足够的细节吗?
谢谢 :)
I need to create a table function that produces a parameter up to a specified number in column 1 always starting from 1. In column 2, if column 1 is divisible by 5 it will say 'Div5' otherwise
NULL
.So as an example. I specify column 1 will stop at 5 the end result will look as follows;
1 NULL
2 NULL
3 NULL
4 NULL
5 Div5
I can create the function, but I'm not sure how to create the conditional first column, or how to say if column 2 divided by 5 is an integer then 'Div5' if it's a decimal then NULL;
create function MyFunction () Returns @Division Table (Ind int , Div5 varchar(30)) AS begin Insert Into @Division (Ind, Div5) select ???,??? Return; End;
I hope this gives enough detail?
Thank you :)
原文:https://stackoverflow.com/questions/35367614
最满意答案
您必须从Google Project控制台中打开防火墙端口8080。 请参阅此链接: https : //console.cloud.google.com/networking/firewalls/list?project = [yourproject-id] 。 将your-project-id替换为Google Project的ID
You have to open the firewall port 8080 from your Google Project console. See this link: https://console.cloud.google.com/networking/firewalls/list?project=[your-project-id]. Replace your-project-id with the id of your Google Project
相关问答
更多-
可能你已经安装了LAMP。 检查是否安装了Apche: dpkg --get-selections | grep -v deinstal | grep apache 你可能会得到这个: apache2 install apache2-bin install apache2-data install apache2-mpm-prefork install apache2-mpm-worker ...
-
聊天中的讨论和调查显示,这实际上是关于远程系统,而不是本地开发设置。 这意味着通常一个包过滤器(“防火墙”)位于客户端和服务器之间。 当使用非标准端口作为“众所周知的协议”时,您需要在服务器防火墙中打开该端口以获取传入流量。 在这种情况下,使用Ubuntu的ufw工具来设置一个简单的包过滤器。 配置自定义端口82并允许传入流量来解决问题。 The discussion and investigation in the chat revealed that this actually was about a ...
-
所以它抛出了这个错误消息,因为你有apache2在端口80上运行。 如果这是为了开发,我只要离开它在5000端口。 如果是生产,也可以: 不建议 先停止apache2 ; 不推荐,因为它在文档中说明: 您可以在开发过程中使用内置服务器,但应为生产应用程序使用完整的部署选项。 (生产中不要使用内置开发服务器) 推荐的 将HTTP流量通过apache2代理到Flask。 这样, apache2可以处理您所有的静态文件(它非常好 - 比Flask内置的调试服务器更好),并且作为动态内容的反向代理,将这些请求传递给 ...
-
我建议在8080上将Noir作为非root用户运行,并使用规则将该域和端口转发到在80上运行的Apache。是否还有另一个原因,您不想这么做? I would recommend running Noir as a non-root user on 8080 and using a rule to forward that domain and port to your Apache running on 80. Is there another reason you don't want to do th ...
-
您必须从Google Project控制台中打开防火墙端口8080。 请参阅此链接: https : //console.cloud.google.com/networking/firewalls/list?project = [yourproject-id] 。 将your-project-id替换为Google Project的ID You have to open the firewall port 8080 from your Google Project console. See this lin ...
-
想通了 - 我使用Google云端平台,他们阻止端口1337,我只需要通过它手动允许TCP。 如果你想知道,命令是 gcloud compute firewall-rules create allow-port-1337 --allow tcp:1337 --description="Allow port 1337 to be accessed" Figured it out -- I was using Google Cloud Platform and they blocked port 1337, ...
-
Apache2端口更改错误(Apache2 Port Change Error)[2022-04-20]
解决了。 我有一个新的路由器,这个需要你设置虚拟服务器的设置。 那是不是很有效。 我的ISP甚至没有阻止端口80.一切都与路由器有关。 Solved. I have a new router and this one need you to set up settings for a Virtual Server. Did that and everyting worked. My ISP didnt even block port 80. Everything had to do with the rou ... -
Linux:删除了apache2但是webserver仍在工作[关闭](Linux: Removed apache2 but webserver still working [closed])[2023-07-28]
如果您在不关闭服务器的情况下删除了包,请执行: sudo killall -9 httpd 如果仍然没有杀死它,请通过执行以下操作来查看实际使用端口80的内容: netstat -anp | grep LISTEN | grep 80 找出服务器是什么,使用端口80并停止/杀死它。 If you've removed the package without shutting down the server first, execute: sudo killall -9 httpd If that st ... -
添加另一个端口apache2(Adding another port apache2)[2023-07-21]
我忘了去/etc/apache2/ports.conf并添加Listen 1998然后我在我的虚拟主机中添加了NameVirtualHost *:1998 I forgot to go to /etc/apache2/ports.conf and add Listen 1998 then i added NameVirtualHost *:1998 in my virtualhost -
这可能是wordpress配置的问题。 我认为如果您在另一个域中,wordpress使用wordpress地址(网址)或网站地址(网址)进行重定向。 因此,您应将此地址配置为localhost和localhost:8080。 It was a browser issue. Chrome and Firefox were automatically changing the URL to localhost. It works with curl and in Incognito/Private modes. ...