Update table T1
set value1 = ( select value 2 from T2 where T1.ID1= T2.ID2)
where exists ( select 1 from T2 where T1.ID1 = T2.ID2)
这里的 set value 为什么会 update multiple rows ?
thanks a lot
What's the most efficient data structure in Java to express:
key -> {key1:value1, key2:value2, ... keyN:valueN}
HashMap is one way. Since I need no operation other than
getter/setter, class is kind of heavy. Anything lighter?
比如我把一个JSON的stream存在MongoDB
[{time1:value1},{time2:valu2}...]
CREATE TABLE json_test (
id serial primary time,
data jsonb
);
然后做
SELECT * FROM json_test WHERE Value>threhold?
这样的可以
不知道发在哪里好,就发这里了。这里能人多,能不能帮我一个忙。我正在学excel
VBA,今天遇到一个pivot table问题。The routine is to filter the page field
for the dates before 30 Nov 2013. But it doesn't work. The system pops up an
error message: object or application defined error. 可是我找死都找不到问题
在哪里。也许你们看到那个inputbox function 很奇怪。本来我想通过它输入一个日期
,然后pivot table根据输入的日期自动filter the pivot table。但是有问题。我就
用30/11/2013来测试。可惜还是没反应。愁呀,求大牛帮忙,不胜感激。
Sub Update()
Application.Calculation = xlCalculationManual
Worksheets("pivot").Select
ActiveSheet.Pivo... 阅读全帖
select *, a.visit as visit1, b.visit as visit2,
a.date as date_start, b.date as date_end, a.value as value1, b.value as
value 2
from (select * from one where visit = 0) a
left join one b on (a.id = b.id and b.vist > 0 )
Ii dont have sas, but idea is the same. list all first visit, and find all
other visits after the first visits for the id. and align them on the same
row. that is what left join is good for.
For example,use Format to group first
Proc Format;
Value Quarter
m1-m2='Q1'
m2-m3='Q2'
m3-m4='Q3'
m4-m5='Q4';
run;
Data B;
Set A;
quarter=put(yyymmm, quarter.);
run;
proc sql;
create table C as
select quarter, sum(value1) as CV1, sum(value2) as CV2, sum(value3) as CV3
from B
group by quarter;
quit;
If only a few outliers, you can use the annotate facility.
data my_labels;
retain xsys ysys '2' function 'label' position '1' style "'Arial/bo'"
color 'blue';
set data1;
if read>75 then do;
text='Value1'; x=write; y=read; output;
end;
run;
proc gplot data=data1;
plot read*write/annotate=my_labels;
run;
quit;
How about this one if you need run 5 times:
%macro log(I)
PROC RLOGIST DATA=FINAL FILETYPE=SAS;
NEST SDMVSTRA SDMVPSU;
WEIGHT WTDR2D4YR;
CLASS A;
MODEL Y= A B A*B;
PREDMARG A*B / B=(&I);
PRED_EFF B=(-1 1)*A=(1) / A=(&I);
RUN;
%mend;
%log(value1)
%log(value2)
and so on.
Link: http://accessories.us.dell.com/sna/products/Luxury_Designer/productdetail.aspx?c=us&l=en&cs=19&sku=A2166986
Market Value1 $49.99
Total Savings $39.99
Dell Price $10.00
Mandarina Duck, the iconic Italian brand known around the world for its
modern design aesthetic and functional designs, has custom-designed a padded
computer sleeve that exactly fits the Adamo computer. The sleeve will fit
into a standard briefcase, and is also attractive enough to carry.
available in B
Link: http://accessories.us.dell.com/sna/productdetail.aspx?sku=A3913945
The 42" class (42" diagonal) LC-42SB48UT, with full HD spec 1080p resolution
and an elegant design, produces superb picture quality. The LC-42SB48UT
features high contrast, a fast response time and wide viewing .
Market Value1 $949.99
Total Savings $490.00
Dell Price $459.99
10% cashback from Discover Card if you shop through their site and pay using
their CC.
Highlights
Experience full HD 1080p... 阅读全帖