数据库是access xp, 采用的是system dsn,其余都是缺省设置。
更新记录语句为:
update people set lastname='hhe', firstname='hehe', middlename='',
emailaddress='',
homepage='', institute='University', memo='' where peopleid=1
出错信息如下:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query.,
SQL state S1000 in SQLExecDirect in people_save.php on line 40
但是读取数据没有任何错误,请问可能是什么原因,怎么解决?谢谢
I have a table like
id parent_id lastname firstname
1 0 A 1
2 0 B 1
3 1 A 2
4 3 A 3
....
So you can see id 1 is parent of id 3, id 3 is parent of id 4
How to right a single SQL query, when you give id = 1, it will return its own
record along with id 3 and id 4 records as its child and grandchild ?
Also, how to write a SQL query, when you gice id = 4, it will return its own
re
For your first question, and for the second onw it's pretty much same.
Sorry it's not simple. We have to wait for Yukon to write simple recursive
queries
(For microsoft sql server)
Create Table #tmpTABLE (ID int, parent_id int, lastName varchar(50), firstName
varchar(50) )
declare xTmp scroll cursor for SELECT * from tablename
open xTmp
declare @myid int
declare @pid int
declare @lName varchar(50)
declare @fName varchar(50)
declare @found bit
declare @tmpID int
declare @tmpPID int
declare @num i
+ is concatenation ; we use that a lot to find out and furthuer more, to
remove duplicate record. But, first thing first, how do you define your
duplicate is up to you.
you can use the Plus sign to concatenate string together...
Usually a table contains many, if not thousands of same first name, so, only
the same firstname&lastname&address combination together truly counts as a
duplicate.. it depends on how you define *duplicate* in your own table..
How to add a hash? I used the Checksum function, but I heard that HashType
is more powerful than Checksum. Anyway, let's say you want hash on the the
combination of first name, last name and address, you can do this:
Alter table person
Add hash as checksum(firstname,lastname,address)
After you created hash, searching for duplicate record is much easier, you
just need to run below query:
select hash,count(*) from person group by hash having count(*)>1
I have a .cvs file to load to database. The requirement are:
• In cases with first, last, and middle names, the names should be
merged into a single field as “Lastname, Firstname”
• Any records with an “Address2” value should have both address
parts combined into a single field
• Also, be sure to specify a BAD file location as you will need to
process the records in this file in the steps that follow.
My control file is:
REM This is to load a file, Part 1, assignment 3
LOAD D... 阅读全帖
I am new to cassandra and want to know how to design a security db.
In RDBMS, it's modeled like belows:
1. membership table uid, username, password,email,etc.
2. user table uid,firstname,lastname, phone,address,etc.
3. password history table pid,uid,passwordhashed,etc
4. roles rid, rolename, description
5. Permission peid,permissionname,description
6. role-permission-mapping rid,peid
7. user-role uid,rid4
some basic operations:
1. query if user has role
2. query if user has permission
3. CRUD pe... 阅读全帖
关于简历 和 找工作 - 几点个人意见
陆陆续续收到一些朋友们的简历。背景都很awesome,但是简历terrible。相反跟我认
识的这里的美国人比,他们的背景都不怎么样,很多psychology或者english专业的,
但是简历相当impressive。这个就是如何UPSELL你自己的问题,或者personal
marketing。
(1)申请一个professional looking的email address。什么叫professional looking
,去找几个business card来看看,一般都是 f****************[email protected]。或者
f*****************************[email protected]。收到的简历目前没有一个是
professional looking的电子邮件。
(2)不要mention你有绿卡。除非你竞争的人100%都是中国人。It ONLY
differentiates you in a negative way as you are telling people that you NOT
... 阅读全帖
Not sure what OP means for company.com. It should be avoided to use
current employer's domain name for job seeking communication. Using
personal email address such as gmail/yahoo/hotmail is more appropriate.
But agree with OP that using FirstName+LastName in the ID part. For example
use JohnDoe123@ mitbbs.com, but not to use tictactoe@ mitbbs.com
关于简历 和 找工作 - 几点个人意见
陆陆续续收到一些朋友们的简历。背景都很awesome,但是简历terrible。相反跟我认
识的这里的美国人比,他们的背景都不怎么样,很多psychology或者english专业的,
但是简历相当impressive。这个就是如何UPSELL你自己的问题,或者personal
marketing。
(1)申请一个professional looking的email address。什么叫professional looking
,去找几个business card来看看,一般都是 f****************[email protected]。或者
f*****************************[email protected]。收到的简历目前没有一个是
professional looking的电子邮件。
(2)不要mention你有绿卡。除非你竞争的人100%都是中国人。It ONLY
differentiates you in a negative way as you are telling people that you NOT
... 阅读全帖
Not sure what OP means for company.com. It should be avoided to use
current employer's domain name for job seeking communication. Using
personal email address such as gmail/yahoo/hotmail is more appropriate.
But agree with OP that using FirstName+LastName in the ID part. For example
use JohnDoe123@ mitbbs.com, but not to use tictactoe@ mitbbs.com
请在名单上的同学尽快注册,如果今晚9pm EST还没有注册的话,版务会把你的位置给
在waiting list上面的同学。
“一定是用麦地注册ID填写first name and last name,请
不要用其他方式填写, 如因此不能被批准者,后果自负。”
比如上面VIP 名单第一个是Meganli1998, 那她注册的话:Firstname: Meganli1998,
last name: Meganli1998.
谢谢大家!
I think you need to join these two tables
select p.FirstName, p.LastName, a.City, a.State
from person as p, address as a
from person JOIN address, ON p.person_ID = a.person_ID
你别据说据说什么的。你去top10的学校网上看看就知道了。
下面是一个学校网上的信息。
Student Statistics 2012 Finance Profile
Fall 2012 Admissions
# Applicants 134
# Enrolled 3
他们招了3个。
再看看经济系一年毕业的有多少:
Ph.D. Candidates in 2012-2013
Lastname, Firstname
Almunia, Miguel
Chodorow-Reich, Gabriel
Friedman, Willa
Gerard, Francois
Hausman, Joshua
Herr, Dr. Jane Leber
Huang, Xing
Lee, Insook
Lleras, Dr. Juan Sebastian
Maheshri, Dr. Vikram
Mergo, Teferi
Nayeem, Omar
Noguera, Dr. Guillermo
Poirier, Alexandre
Romem, Israel
Rosato, Antonio
Serafinell... 阅读全帖
你别据说据说什么的。你去top10的学校网上看看就知道了。
下面是一个学校网上的信息。
Student Statistics 2012 Finance Profile
Fall 2012 Admissions
# Applicants 134
# Enrolled 3
他们招了3个。
再看看经济系一年毕业的有多少:
Ph.D. Candidates in 2012-2013
Lastname, Firstname
Almunia, Miguel
Chodorow-Reich, Gabriel
Friedman, Willa
Gerard, Francois
Hausman, Joshua
Herr, Dr. Jane Leber
Huang, Xing
Lee, Insook
Lleras, Dr. Juan Sebastian
Maheshri, Dr. Vikram
Mergo, Teferi
Nayeem, Omar
Noguera, Dr. Guillermo
Poirier, Alexandre
Romem, Israel
Rosato, Antonio
Serafinell... 阅读全帖