如何使用完全外连接测试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 | +----+-------------------------------+--------------+---------+
原文:
最满意答案
回答我自己的问题。
由于我静态链接到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 ...
-
OpenSSL自定义开发(OpenSSL custom development)[2023-12-14]
因此,假设您修改的库安装在/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= ... -
如何使用特定版本的zlib在ubuntu上构建openssl?(How can one build openssl on ubuntu with a specific version of zlib?)[2022-05-23]
答案结果是,您需要使用类似于以下语法设置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.
-
在Ubuntu 10.04上使用最新的OpenSSL进行Opdate Curl(Opdate Curl with newest OpenSSL on Ubuntu 10.04)[2022-01-06]
我的情况非常相似。 经过大约一天的参数调整之后,我发现了使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,但这些可 ... -
C - 在Ubuntu v12.10上编译OpenSSL头文件的问题(C - Compiling problems with OpenSSL header files on Ubuntu v12.10)[2024-01-02]
回答我自己的问题。 我能够按照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 ...