首页 \ 问答 \ 如何使用完全外连接测试NULL?(How do I test for NULL with a full outer join?)

如何使用完全外连接测试NULL?(How do I test for NULL with a full outer join?)

我有一个名为TabOne的表,其中包含这些列Id Date Price description

+----+-------------------------------+--------------+---------+
| id | Date                          |   Price      | descri  |
+----+-------------------------------+--------------+---------+
| 1  |2014-05-05                     |    10         |     bab|
| 2  |2014-05-05                     |    50         |     bab|
| 3  |2014-05-05                     |    50         |     bab|
| 1  |2014-05-04                     |    60         |     bab|
| 4  |2014-05-04                     |    60         |     bab|
| 5  |2014-05-04                     |    70         |     bab|
| 6  |2014-05-04                     |    70         |     bab|
|    |                               |               |        |
+----+-------------------------------+--------------+---------+

我必须比较两个日期之间的价格,如果日期中的条目在另一个日期没有等价,我必须同时显示它

+----+-------------------------------+--------------+---------+
| id |                               |   Diff       | descri  |
+----+-------------------------------+--------------+---------+
| 1  | 2014-05-05 2014-05-04         |    60-10      |     bab|
| 2  | 2014-05-05                    |    Null       |     bab|
| 3  | 2014-05-05                    |    Null       |     bab|
| 4  | 2014-05-04                    |    Null       |     bab|
| 5  | 2014-05-04                    |    Null       |     bab|
| 6  | 2014-05-04                    |    Null       |     bab|
|    |                               |               |        |
+----+-------------------------------+--------------+---------+

2014-05-05
2014-05-04

所以我写道:

Select tabOne.Price - TO.Price from TabOne
Full outer JOIN TabOne as TO on TO.id = TabOne.id and TO.Date='2014-05-04'
where TabOne.Date='2014-05-05'

但它一直让我觉得我在2014-05-05就存在

+----+-------------------------------+--------------+---------+
| id |                               |   Diff       | descri  |
+----+-------------------------------+--------------+---------+
| 1  |                               |    60-10     |     bab |
+----+-------------------------------+--------------+---------+

I have a table named TabOne containing those columns Id Date Price description

+----+-------------------------------+--------------+---------+
| id | Date                          |   Price      | descri  |
+----+-------------------------------+--------------+---------+
| 1  |2014-05-05                     |    10         |     bab|
| 2  |2014-05-05                     |    50         |     bab|
| 3  |2014-05-05                     |    50         |     bab|
| 1  |2014-05-04                     |    60         |     bab|
| 4  |2014-05-04                     |    60         |     bab|
| 5  |2014-05-04                     |    70         |     bab|
| 6  |2014-05-04                     |    70         |     bab|
|    |                               |               |        |
+----+-------------------------------+--------------+---------+

I have to compare Prices between two dates, and if an entry in a date have not an eqivalent in the other date I must show it also

+----+-------------------------------+--------------+---------+
| id |                               |   Diff       | descri  |
+----+-------------------------------+--------------+---------+
| 1  | 2014-05-05 2014-05-04         |    60-10      |     bab|
| 2  | 2014-05-05                    |    Null       |     bab|
| 3  | 2014-05-05                    |    Null       |     bab|
| 4  | 2014-05-04                    |    Null       |     bab|
| 5  | 2014-05-04                    |    Null       |     bab|
| 6  | 2014-05-04                    |    Null       |     bab|
|    |                               |               |        |
+----+-------------------------------+--------------+---------+

2014-05-05
2014-05-04

so I wrote :

Select tabOne.Price - TO.Price from TabOne
Full outer JOIN TabOne as TO on TO.id = TabOne.id and TO.Date='2014-05-04'
where TabOne.Date='2014-05-05'

but it keeps shoing me just Id existing on 2014-05-05

+----+-------------------------------+--------------+---------+
| id |                               |   Diff       | descri  |
+----+-------------------------------+--------------+---------+
| 1  |                               |    60-10     |     bab |
+----+-------------------------------+--------------+---------+

原文:
更新时间:2021-08-26 12:08

最满意答案

回答我自己的问题。

我能够按照SB给出的指示解决问题这个SO线程中

由于我静态链接到OpenSSL,我已将以下文件复制到Eclipse CDT中的C项目中。

  • libcrypto.a
  • libssl.a

Answering my own question.

I was able to solve the problems by following the instructions given by SB. in this SO thread.

As I’m statically linking to OpenSSL, I’ve copied the following files to my C project in Eclipse CDT.

  • libcrypto.a
  • libssl.a

相关问答

更多
  • 您正在运行过时的RVM版本。 您应该使用http://rvm.io上介绍的建议安装路径,并且不要使用软件包安装程序。 要修复此检查,请访问https://stackoverflow.com/a/9056395/497756 。 也不要使用1.9.2而不是使用当前的1.9.3 ruby而对于新项目使用在RC1中的2.0.0并且应该很快发布。 You're running an outdated version of RVM. You should go with the recommended install ...
  • 你想安装开发包,这是libssl-dev: sudo apt-get install libssl-dev You want to install the development package, which is libssl-dev: sudo apt-get install libssl-dev
  • g++ -I. *.cpp 这告诉编译器在当前目录中找到头文件,而不仅仅是在默认目录(/ usr / include和/ include)中。 我建议你编译这个简单的例子来使用GNU Make。 标准规则适合您。 make file.cpp main.cpp 也许,如果您遇到相同的问题(找不到file.h),您可以设置CXXFLAGS = -I。 g++ -I. *.cpp This tell the compiler to find the header files on the current d ...
  • 对于ns,所有在一个包中都不需要执行./configure .just解压缩tar文件并进入一个2.35文件夹类型./install。 对于Ubuntu你需要修改tclcl中的一些源文件,工具请参考以下链接 http://erl1.wordpress.com/2011/05/12/installing-ns-2-34-on-ubuntu-11-04/ For ns all in one package no need to execute ./configure .just extract tar file ...
  • 通常,通过为库的不兼容版本提供不同的soname(例如libssl.0.9.7 vs libssl.1.0.0)来解决这样的问题。 如果您的libssl.so版本没有版本化的soname,那么它就会被破坏。 要检查库的soname以及程序所链接的soname,请执行这些命令 ldd /path/to/your/program/Test | grep openssl objdump --private-headers /usr/lib/libssl.so* | grep SONAME 如果您的程序与li ...
  • 因此,假设您修改的库安装在/usr/local/ssl ,您可以使用以下命令编译代码: gcc -I/usr/include/ssl -o foo.o -c foo.c gcc -I/usr/include/ssl -o bar.o -c bar.c 和以下链接: gcc -o my_prog foo.o bar.o -L/usr/local/ssl/lib -lssl -lcrypto -ldl -L将使该目录中的库优先于gcc configs中隐式定义的库 一个基本的Makefile可能是: CC= ...
  • 答案结果是,您需要使用类似于以下语法设置rpath。 我在Makefile中做了我的,这是双'$'的原因。 LDFLAGS += -Wl,-rpath,'$$ORIGIN/../lib' 现在,我不一定需要在库(openssl)本身上执行此操作。 我可以在调用可执行文件上执行此操作。 如果库没有rpath,则接下来使用可执行文件上的rpath。 简而言之,我不需要强调ldd -r 返回错误的路径,前提是ldd -r 返回正确的路径。 我可以使用以下命令通过库 ...
  • 在这里回答了我自己的问题: 我删除了以下configure选项,我后续的make工作顺利。 --no-create --no-recursion 这解决了我的问题。 Answered my own question here: I removed the following configure options and my subsequent make worked without a hitch. --no-create --no-recursion This fixed my issue.
  • 我的情况非常相似。 经过大约一天的参数调整之后,我发现了使curl(7.58)在openssl支持下正确编译的魔力。 CPPFLAGS="-I/usr/local/ssl/include" LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib" ./configure --with-ssl=/usr/local/ssl --enable-shared 我也传入了--with-zlib和--prefix = / usr / local / curl,但这些可 ...
  • 回答我自己的问题。 我能够按照SB给出的指示解决问题。 在这个SO线程中 。 由于我静态链接到OpenSSL,我已将以下文件复制到Eclipse CDT中的C项目中。 libcrypto.a libssl.a Answering my own question. I was able to solve the problems by following the instructions given by SB. in this SO thread. As I’m statically linking to ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)