由买买提看人间百态

topics

全部话题 - 话题: sql2
(共0页)
S*******0
发帖数: 208
1
来自主题: CS版 - VBA ask for help
Can someone help me with the code, simply put is : find a cell in excel, and
copy the sql reusult dataset starting from the cell found, my code is as
follows, it did not indicate any error, but could not run, please help me to
identify where the problems, many thanks
Sub reshnepoolmonthValues()
Worksheets(2).Activate
Dim valuedt As String
Dim sql1 As String
Dim sql2 As String
Dim sql3 As String

Dim wrk As Worksheet
Dim inRng1 As Long

Dim inrng2 As Long

D... 阅读全帖
d*******8
发帖数: 3182
2
04/11/2008
SQL1 Total 2165.72694492
SQL2 Total 2200.25103188
SQL3 Total 2922.04847908
04/12/2008
SQL1 Total 2316.902812
SQL2 Total 2361.45646501
SQL3 Total 3111.09219217
04/13/2008
SQL1 Total 2231.486696
SQL2 Total 2277.06693292
SQL3 Total 2951.74333119
k**g
发帖数: 1558
3
建立一个自己的procedure用来rank不同table里面的数据
Create Procedure ASCRanking
@variable varchar(20),
@Rnk_variable varchar(20),
@tablename varchar(50),
@numberofcategory varchar(5),
@Partition varchar(50)
As
Declare @sql1 varchar(200)
Declare @sql2 varchar(200)
BEGIN
set @sql1='Alter Table '+@tablename+'Add '+@Rnk_variable+' real'
EXEC(@sql1)
--set @sql2='Update '+@tablename+
--' Set '+@Rnk_variable+'=NTILE('+@numberofcategory+') OVER(PARTITION BY '+@
Partition+' ORDER BY '+@variable+' ASC)'
--EXEC(@sql2)
END
... 阅读全帖
E********r
发帖数: 99
4
来自主题: BuildingWeb版 - 请问一个数据库 连接的问题。
请问一个数据库连接的问题
我用ASP连接ACCESS数据库
尝试用了两种连接方式:
第一种是用DSN的,在执行任何SQL语句的时候
都没有问题。
但如果改成如下方法:
cn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("f
pdb\db1.mdb")
在执行INSERT,UPDATE操作比如:
sql2 = "INSERT INTO StudentInfo(StudentID) VALUES(1234567)"
cn.Execute sql2
结果就会出错:
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
我感到十分困惑,请指点。谢谢。
p*****y
发帖数: 69
5
来自主题: Database版 - something about SQL
" target="_blank" class="a2">http://www.jcc.com/SQLPages/jccs_sql.htm
ftp://jerry.ece.umassd.edu/isowg3/ If you visit the top level of that
server, be sure to read ``readme.txt.'')
The SQL2 draft standard and working group documents. (The final version of
the SQL2 standard are available from the usual sources for standards.) :
ftp://jerry.ece.umassd.edu/isowg3/dbl/BASEdocs/
The FIPS-127 (Federal Information Processing Standard) documents, including
NIST compliance information. FIPS-127 adopts S
d*******8
发帖数: 3182
6
To Beijing:
这里的SQL1,SQL2,SQL3 只是简化的用以表述的例子,真正的SQL后面还有〉100Char
的条件的呢。所以归根结底的结果应该是相同的。与你用以举例的3个简单table不同。
To coolbid:
不懂什么是exec plan,就简单写下我的script吧:
ls = [sql1, sql2, sql3]
t = []
r = []
for l in ls:
....start = time.time()
....r.append(getResultSetFromDB(l))
....end = time.time()
....t.append(end-start)
w*****g
发帖数: 198
7
i guess in US, they call it SQL2
but in school, we call it SQL99 :)
s*****c
发帖数: 36
8
来自主题: Database版 - question

CAST is a reversed word in SQL2 Standard. Generaly, it
should have two
argus: value and new data type. But in diffrent DBMSs, the
syntax maybe a little diffrent, so you'd better refer to
your server's documents. Convert is another funtion similar
with Cast.
For SQL Server, the syntax is: CAST(expression as datatype),
and it doesn't suporrt user-defined datatype in CAST.
p********e
发帖数: 60
9
来自主题: Database版 - [转载] 旋转完成?
【 以下文字转载自 Science 讨论区,原文如下 】
发信人: purplewave (紫药水), 信区: Science
标 题: 旋转完成?
发信站: Unknown Space - 未名空间 (Tue Feb 3 09:10:36 2004) WWW-POST
Turing-complete 是这个翻法么?
http://www.linuxforum.net/books/postgresNEW/sql.htm
http://www.pgsqldb.org/pgsqldoc-7.0c/sql.htm
。。。 。。。
ISO 和 ANSI 委员会已经在一个大大地扩展了最初的标准的新版本的定义上工作了好几年
,常被非正式的称之为 SQL2 或 SQL/92。这个版本成为一个批准了的标准 -
"International Standard ISO/IEC 9075:1992, Database Language SQL" - 在1992 年
晚些时候。SQL/92 是人们常说的 "SQL 标准" 时所指的版本。SQL/92 的详细描述在
Date and Darwen, 1997
d*******8
发帖数: 3182
10
OK, I already wrote a script and will test them tonight and this weekend (2
times):
SQL1 like:
select * from A where ID in (select ID from B where B_ITEM=123 union
all select ID form C where C_ITEM=456 )
SQL2 like:
select * from A
inner join B on ...
inner join C on ...
where B_ITEM = 123 and C_ITEM =456
SQL3 like:
select a.ID
from A a, B b, C c
where (b.ITEM_B = 123 AND b.ID = A.ID) OR
(c.ITEM_C = 456 AND c.ID = A.ID);
是同时用3个连接测还是1 by 1测精确?
any suggestion?
k********e
发帖数: 702
11
DBA们,SQL1和SQL2根本求的不是一个结果吧
apple vs. orange 比什么比?
B*****g
发帖数: 34098
12
do you get same result for sql1 ,sql2?
d*******8
发帖数: 3182
13
04/14/2008
SQL1 Total 2386.87175417
SQL2 Total 2836.06475782
SQL3 Total 4909.92693806
Results1 is as same as Results2.
Results3 is as same as Results2.
Results1 is as same as Results3.
B*****g
发帖数: 34098
14
ok.
How do you test sql 1-3? always in order sql1, sql 2, sql3? if yes, can you
try sql3, sql2 ,sq1.

100Char
c*****d
发帖数: 6045
15
来自主题: Database版 - SQL脚本?
sql1;
sql2;
sql3;
c*****d
发帖数: 6045
16
来自主题: Database版 - SQL脚本?
我估摸着lz是sa,对dba不了解
应该就是sql1; sql2; sql3,还用不到sp
j*****4
发帖数: 283
17
来自主题: Database版 - SQL脚本?
sql1;
sql2;
sql3
在sqldeveloper下就不可以
c*****d
发帖数: 6045
18
来自主题: Database版 - SQL脚本?
sql developer没玩过,不能sql1; sql2; sql3这么用吗?
只用过sql plus,连toad都不常用
(共0页)