SELECT
Left([field1], inStr([field1], ",") - 1 ) AS lastName,
Right([field1], inStr([field1], ",") ) AS firstName
FROM Table1;
then I switched to design view and those showed up in the "field" boxes:
lastName: Left([field1],InStr([field1],",")-1)
firstName: Right([field1],InStr([field1],",")) http://office.microsoft.com/en-us/assistance/HA010547271033.aspx
if you want to count function,
you need to add something like this: group by field1
so the final SQL looks like below,
select field1, count(field1) from table1 group by field1
select t1.id, t1.f1,t2.f2,t3.f3
from (select id, last(field1) as f1
from table1
where field1 is not null
group by id) t1,
(select id, last(field2) as f2
from table1
where field2 is not null
group by id) t2,
(select id, last(field3) as f3
from table1
where field3 is not null
group by id) t3
where t1.id = t2.id
and t1.id= t3.id
or
select t0.id,
(select last(t1.field1) from table1 t1 where t1.id = t0.id and t1.fie
ld1 is not null) AS field1,
(select last(t2.field2) from table1 t2 wher
我的需求是在多个表的多个字段中进行全文查找, 像:
table1.field1 like '%keyword1%' AND table1.field1 like '%keyword2%'
OR table2.field1 like '%keyword1%'...
除了PostgreSQL的tsearch和OpenFTS, 还有没有方便点的东西?
谢谢.
我的数据情况如下:
每个ID有多组重复测量的值,但是有的没有测量值
ID field1 field2 filed3
1
1 z
1 x y Null
2 a
2 Null b c
.
.
.
n
n e f
n d Null Null
想通过query得到每个field最后一个非空的数值,即:
ID field1 field2 filed3
1 x y z
2 a b c
...
n d e f
用total,last 得出的只能得到最后一组值:
ID field1 field2 filed3
1 x y Null
2 Null b c
n d Null Null
谢谢大家啦!
哪位大侠知道怎么SORTING 中文 IN ORACLE。 我试用
select field1 from globaltest where language
= 'Simplified Chinese' order by NLSSORT(field1,
'NLS_SORT=Chinese');
得到了一个ERROR,ORA-12702: invalid NLS parameter string
used in SQL function
先谢了
Oracle now only support binary sort for Eastern Languages
included Chinese.
So for Chinese try:
select field1 from globaltest where language
= 'Simplified Chinese' order by NLSSORT(field1,
'NLS_SORT=binary');
我写了一个语句:select id from table1 as a inner join table2
as b on a.field1=b.field1 and a.field2 in (1,2) where
b.field2='str'
在sql server中通过了,但我想在access中使用,可能是inner join
出了问题,希望指教,谢谢!
no delete. Here is the pseduo scripts:
package ETL
function load_feed1
return LOAD.IMPORT('A')
end;
function load_feed2
return LOAD.IMPORT('B')
end
end ETL
package LOAD
function IMPORT(externalTable as varchar2) return number
MERGE INTO targetTable x using externalTable y
on x.key = y.key
WHEN MATCHED THEN UPDATE
set field = y.field
WHEN NOT MATCHED THEN INSERT
(field1, field2) values (y.field1, y.field2);
一个select query,criteria是field1等于1,field2是group by field3里最大的。
我写了下面的query,可是总告诉我最多只能return一个record,而在我的data set里
符合标准的应该有几百个才对。我用Access2007。请高人指点。
SELECT Table.*
FROM Table
WHERE Field1 = 1
AND Table.Field2 = (SELECT max(Field2) FROM Table GROUP BY Field3)
one table as
field1 field2 field3 filed4
1 3 4 5
2 3 2 1
for each row, the formua is
field1!+field2!+field3+field!
N! means N*(N-1)*....*2*1
how to find the formuala for N! in oracle?
right now my query in c# looks like this,
Table1Entry bMfi = MyDB.Table1.Single(x => x.Name == "abc");
Table1 is like this {Name, field1, field2}.
now i break Table1 into 2 tables,
Table0 has {id, Name};
Table1 has {id, field1, field2}.
What's the easiest way to do a query based on Name now ?
我的 Outline of Contributions 就是这一项里小标题,是我自己加在律师写的PL里的
,再充实了一些内容。我觉得这样突出了重点,一目了然。可能跟其他PL里的模板区别
不大。不过如果能真正做到条理清楚、内容简洁、重点突出,基本上就没问题了。
I. Brief summary of credentials (one page)
A. Dr. XXX has contributed original scientific contributions of major
significance in the field (six and a half pages)
A.1 Dr. XXX is the first scientist to DO SOMETHING in FIELD1 with
programmable TECHNIQUE (Based on first-authored paper #1)
A.2 Dr. XXX independently developed the technology to fabricate SOMETHINGs
in FIELD2... 阅读全帖
正打算写contribution这部分,看到模板有不同的写法,想问一下关于几个要点怎么分
配的问题。
我同事的1A RFE刚过不久,所以我本来是想按他RFE contribution部分来写的:
1. My original scientific research work has been published in top
scientific journals and conferences with very high impacts.
2. My original scientific research work has been selected to present orally
in the largest international conference in my field.
3. My original scientific research work has been widely cited in
publications on top scientific journals by experts in my field from leading
re... 阅读全帖
Group
Group A
A1 - UM A2 - North A3 - Pittsburgh
Group -B
B1 - MSU B2 - West B3 - OSU/Cleveland
Schedule
Field1 Field 2
9:30 A1 vs A2 B1 vs B2
11:30 A2 vs A3 B2 vs B3
1:30 A3 vs A1 B3 vs B1
3:30 2nd place of group A 2nd place of Group B
vs vs
3rd place of group B 3rd place of Group A
5:15 Championship Game
保险起见Access里写两个QUERY吧
QUERY1: SELECT FIELD3, MAX(FIELD2) AS MAXFIELD2 FROM TABLE GROUP BY FIELD3
QUERY2: T.* FROM QUERY1 Q1, TABLE T WHERE FIELD1=1
AND Q1.MAXFIELD2=T1.FIELD2 AND Q1.FIELD3=T.FIELD3
LOAD DATA
INFILE 'input_File.csv’
INTO TABLE tableName
FIELDS TERMINATED BY ","
(field1,
field2,
field3,
field4)
....
question: 可不可以在字段后面加上一个"select id from..."来自动赋值给某一字段?
not sure what u r talking about.....
but let me try to answer...
basically for the data part, the jsp page would have things like
backendData.field1
backendData.field2
backendData.field3
while the controllers (action class) define where you can the backendData,
for example, SController.execute() would call SBusDelegate.getData()...
what UI framework u use?
不用什么dreamweaver的coldfusion。
首先搞清楚apache的数据结构
一般安装在xxx.../htdocs (如 /usr/local/apache/htdocs )
其实用Javascript, Java or Jsp都好,用php会更方便。
用php编写一个小文件如group_upload.php,它的内容是简单的form.
field1 :选择原文件在哪里
field2 :目标文件要放到哪里
group member premisson:Yes, or No
upload button(按这个就上传):这是关键,写一个function内部拷贝/上传文件
...
把group_upload.php放到/htdocs下或子目录/htdocs/yoursubfolder就行了
最好和mysql一起用,这样可方便排序和检索
现在想用JAVA实现和远端通信,怎么定义message format on the wire.
For example, in C, the format is defined like this
struct CMD
{
uint16_t type;
uint16_t operation;
uint16_t field1;
uint16_t fields;
};
after populating this struct, I can call socket send to send out this
message.
In Java, What should I do to implement this ?
Thanks.
say in c i have this
struct MyStruct {
struct MyHeader myHeader;
struct MyPayload myPayload;
};
struct MyHeader{
int id;
char name[MAX];
}
struct MyPayload {
int field1;
short field2;
.... // could be very long
}
what's the best ways in python pls ?
Here is my sas code;
%macro va_111(field1,field2,new_var);
Data c;
merge mydata1 (in=a) mydata2;
by id;
if a;
%if &filed1=2 %then &new_var=0;
%else %if &filed2=" " and &filed1 =. %then &new_var=0;
%else &new_var=1;
run;
%mend;
%va_111(usuage,drugname,status);
Sas log:
WARNING: Apparent symbolic reference FILED1 not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition
where a numeric operand
is required. The condition was: (&filed1)=2
ERROR: The macr