l******9 发帖数: 579 | 1 【 以下文字转载自 Database 讨论区 】
发信人: light009 (light009), 信区: Database
标 题: keep group of values of SQL procedure in one table
发信站: BBS 未名空间站 (Sat May 24 09:48:08 2014, 美东)
I need to print out a group of values from a procedure on SQL server 2008.
If I use select , it generated a distinct table into the result part of SQL
server 2008 managemetn studio every time the procedure is called.
i need to call the procedure in a loop. I want to print the values into one
table.
Thx!
while
begin
my_proce... 阅读全帖 |
|
l******9 发帖数: 579 | 2 【 以下文字转载自 JobHunting 讨论区 】
发信人: light009 (light009), 信区: JobHunting
标 题: SQL fast search in a 10 million records table
发信站: BBS 未名空间站 (Thu Jul 24 23:26:56 2014, 美东)
I need to do a fast search in a column with floating point numbers in a
table of SQL server 2008 R2 on Win 7.
the table has 10 million records.
e.g.
Id value
532 937598.32421
873 501223.3452
741 9797327.231
ID is primary key, I need o do a search on "value" column for a given value
such that I can find the 5 closest... 阅读全帖 |
|
l******9 发帖数: 579 | 3 【 以下文字转载自 Database 讨论区 】
发信人: light009 (light009), 信区: Database
标 题: keep group of values of SQL procedure in one table
发信站: BBS 未名空间站 (Sat May 24 09:48:08 2014, 美东)
I need to print out a group of values from a procedure on SQL server 2008.
If I use select , it generated a distinct table into the result part of SQL
server 2008 managemetn studio every time the procedure is called.
i need to call the procedure in a loop. I want to print the values into one
table.
Thx!
while
begin
my_proce... 阅读全帖 |
|
S******3 发帖数: 66 | 4 SAS hash can do inner join/left join easily.
just for learning purpose, full join is simply a left join + all records in
2nd table that can't be found in the 1st table. By this way, you need load
both table into hash (one full table + one table with key only); and you
need scan both tables once completely, so may not worth much of Hash. |
|
w*******y 发帖数: 60932 | 5 I just got done walking through my local Costco in Clearwater, FL and they
had this tailgate/beer pong table on sale for $49.xx.
I had seen these tables for sale a few months back for $83.xx and it seems
as though the price is around that now on eBay and other merchant websites.
My local Costco had the tables for the Buccaneers, USF Bulls (GO BULLS!!!),
and the hated Florida Gators.
These tables are pretty awesome as they are 8' long and come with a net for
beer pong. These tables fold conveni... 阅读全帖 |
|
w*******y 发帖数: 60932 | 6 Little Tikes Island Adventure Water Table:
http://www.walmart.com/ip/Little-Tikes-Island-Adventure-Water-Table/14668532
Get your kids outside for some aquatic fun with the Little Tikes Island
Adventure Water Table. For endless summertime fun, just add water.
Little Tikes Island Adventure Water Table:
Offers lots of terrain to explore - rivers, moats, waterfall, bridge and
winding roads
3 bellows provide plenty of water action
Little Tikes water table, Island Adventure includes boat, car, bridge ... 阅读全帖 |
|
|
l******9 发帖数: 579 | 8 【 以下文字转载自 Quant 讨论区 】
发信人: light009 (light009), 信区: Quant
标 题: create table on SQL server from python pyodbc
发信站: BBS 未名空间站 (Fri Aug 1 13:19:15 2014, 美东)
am trying to access SQL server 2008 R2 from Eclipse pydev ( python 3.2 ) on
win7 .
I need to create a table on database.
The code can be run well. But, I cannot create tables in the database. If I
print the sql string and run the query from SQL server management studio, no
problems.
import pyodbc
sql_strc = " IF OBJECT_ID('[my_db].[dbo].[my_t... 阅读全帖 |
|
|
c*********u 发帖数: 361 | 10 基本概念,不过问得比较细,觉得比较有参考价值。(这里语言用的是Java)
1. What is a hash table?
2. What does Java do when it creates a hash table?(details, size, load facto
r, etc)
3. How is the hash table implemented to ensure constant lookup time?
4. How is each element of the hash table implemented?
4. Say you have a hash table of size 10 and load factor of 0.5, what ha
ppens when you insert a 6th element? Why? |
|
l******9 发帖数: 579 | 11 【 以下文字转载自 Statistics 讨论区 】
发信人: light009 (light009), 信区: Statistics
标 题: SQL check likeness between two large tables
发信站: BBS 未名空间站 (Tue May 6 15:38:29 2014, 美东)
I need to check the likeness between two data tables on SQL. I am working on
Aginity Workbench for Netezza on Win 7.
The tables are very large. One of them has 100 million rows and 4 columns;
another one has 1500 million rows and 3 columns.
Example, table1
ID1 ID2 ID3 Value
xxxx xxxxxx xxxxxxxx xxx.xxxxxx ... 阅读全帖 |
|
l******9 发帖数: 579 | 12 On SQL Server 2008 R2, I need to add some columns into a table from another
table.
e.g.
Table1:
name value id
Jim 288 abf
Table 2:
name acct num rank
Jim 12 29 8
Jim 98 95 7
Jim 20 52 9
What I need:
name value id acct num rank acct num rank acct num rank
Jim 288 abf 12 29 8 98 95 7 20 52 9
The record numbers in table 2 may be variable.
Any help would be appreciate. |
|
l******9 发帖数: 579 | 13 I need to do a fast search in a column with floating point numbers in a
table of SQL server 2008 R2 on Win 7.
the table has 10 million records.
e.g.
Id value
532 937598.32421
873 501223.3452
741 9797327.231
ID is primary key, I need o do a search on "value" column for a given value
such that I can find the 5 closest points to the given point in the table.
The closeness is defined as the absolute value of the difference between the
given value and column value.
The smaller value,... 阅读全帖 |
|
l******9 发帖数: 579 | 14 I would like to export a data table from IBM netezza SQL daatbase in Aginity
workbench to a txt file on win 7.
I called The sql query from C# in visual studio 2013:
CREATE EXTERNAL TABLE 'C:\path\my_name.txt'
USING
(
Y2BASE 2000
ENCODING 'internal'
REMOTESOURCE 'ODBC'
ESCAPECHAR ''
)
AS
SELECT *
FROM admin.my_table
I logged in as admin in the database. But, I got error:
Exception captured: System.Data.Odbc.OdbcExce... 阅读全帖 |
|
|
|
|
g********s 发帖数: 3652 | 18 全美首家非盈利性食品超市Daily Table近日在波士顿地区开业。这家超市最大的特点
是所销售的食品比普通超市卖的更便宜,致力于让低收入人群吃得更加健康。来看美国
中文电视驻波士顿记者李州的报道。
这家由连锁食品超市Trader Joe's前总裁Doug Rauch创办的Daily Table超市位于波士
顿南部的Dorchester镇,该区是波士顿地区的中低收入社区之一,超市采取会员制,主
要是为了服务周边居民,因此会员必须提供他们居住地的邮政编码。
Daily Table里食品的售价仅为普通超市售价的百分之四十到七十,而之所以能提供低
廉的价格,是因为其大部份产品都来自于农场、超市或生产厂家以及食品经销商的接近
“到期日”的多余库存产品。
据悉全美每年有高达40%的食物被浪费,而同时也有很多低收入人群挣扎于每天的吃饭
问题。创办人Doug Rauch表示,Daily Table这样的超市不仅可以减少食物浪费,还可
以以更亲民的价格为人们提供健康的餐点,为那些有工作的低收入人群提供他们能够负
担得起的食物。
Ales :我认为这是个非常好的想法,这会帮助许多低收入家庭,相比其它超市... 阅读全帖 |
|
Z***e 发帖数: 3693 | 19 我们家孩大了,不玩了。谁想要,免费赠送。
那 Air Hockey Table 翻过来就是个小 Pool Table。
尺寸:Air Hockey / Pool Table 84”(L) X 42”(W) X 32”(H)
尺寸:Foosball Table 56”(L) X 30”(W) X 34”(H) |
|
|
|
w***w 发帖数: 6301 | 22 Atlantic City’s Trump Plaza Casino has agreed to test 12 automated poker
tables for PokerTek, Inc., making it the first casino to have the dealerless
tables in the stake of New Jersey.
The tables have already been implemented at places like the Mohegan Sun in
Connecticut and
Canada’s Casino de Montreal, which has hosted a tournament with the
automated tables.
The tables feature no dealers — there is a centralized screen that shows a
dealer and the community cards. Each player has an individual m |
|
b*******e 发帖数: 36 | 23 1.0: Casino Basics
1.1: Choosing a table
Before playing the game, you'll need to find an appropriate table at which
to play. If you're a newcomer to this process, there are a few items to keep
in mind. You'll want to pay attention to several details about each table
that you approach. The most important item is the sign declaring betting
limits. Both the minimum and the maximum allowable bets should be clearly
posted on a sign on the table-top. Look around to find a table that suits
your bet siz |
|
b*s 发帖数: 82482 | 24 电子版的图不够大。一个iPad才十寸,都有很多人受不了了,coffee table的size,很
多人的手就废了,呵呵……
根据wikipedia:
A coffee table book is a hardcover book that is intended to sit on a coffee
table or similar surface in an area where guests sit and are entertained,
thus inspiring conversation or alleviating boredom. They tend to be
oversized and of heavy construction, since there is no pressing need for
portability. Subject matter is generally confined to non-fiction, and is
usually visually oriented. Pages consist mainly of photograph... 阅读全帖 |
|
m****e 发帖数: 1197 | 25 【 以下文字转载自 Database 讨论区 】
发信人: mentee (Bless 2011), 信区: Database
标 题: 问个ACCESS比较2个TABLE的问题
发信站: BBS 未名空间站 (Tue Jun 7 16:47:21 2011, 美东)
TABLE A,里面有2条数据, 如下:
Hierarchy Level 1 Level 2 Level 3 Level 4 Leaf
ACCT_REPORTING ACCOUNT BALANCES OFF_BAL_SHEET
Acct1234
ACCT_REPORTING ACCOUNT MEMO_ACCOUNT AWARD_EXPCT
Acct4321
TABLE B,里面也是2条数据,如下;
Hierarchy Level 1 Level 2 Level 3 Level 4 Leaf
ACCT_REP... 阅读全帖 |
|
k*****i 发帖数: 9 | 26 I have two choices:
(1) two thousand tables each with 3 hundred records(rows)
(2) 3 hundred tables, each having two thouand tables.
If only considering useness, i prefer (1). Because it saves all data that I
will use in a table. I don't need to do any search. While in (2), i have to
search accross all tables by key to collect information.
Which works better?
Thanks.
access, |
|
b*****y 发帖数: 26 | 27 1.
Well, as I said, indexing large tables is not a good idea.
If an index cannot be all loaded into the memory,
then we are going to have O(log n) disk access,
compared with O(n) memory access.
This explains why data base servers require small index files and small
tables.
I can cite this link if you do not understand
why we normally do table scans for large tables.
http://www.mysqlperformanceblog.com/2006/06/09/why-mysql-could-be-slow-with-large-tables/
2.
fit
You severely underestimated the si |
|
g****s 发帖数: 1 | 28 我有一个temp table存着数十个table names
求教怎样只用SQL列出所有table的count(*)
具体就是如何把temp table得一个个表名转成变量被select count(*) from 认识
现在的做法是把table name list存入一个shell varible, 然后用shell的for loop一
个一个地死算,但是这样要进进出出dbaccess几十回,不好看,如果一次能在sql
level上搞定就好了。 |
|
M***7 发帖数: 2420 | 29 Hi all. I am a rookie of SQL. Here is my question:
table 1:
number name
1 A
2 B
3 C
table 2:
city zip
AA 01
BB 02
CC 03
the two tables are not related at all. How could I use SELECT to get the
table 3 as below
table 3:
number name city zip
1 A AA 01
2 B BB 02
3 C CC 03
Thanks a lot. |
|
h*****6 发帖数: 866 | 30 现在组的manager说的。
俺的工作涉及把TSQL stored procedure code转成PL SQL, 有的 TSQL stored
procedure 有两三千行代码,好几个TEMP tables, 如果PL SQL 不用TEMP table,就只
能用 Associative Array or nested table, 处理数据,最后写到表里,中间过程不用
TEMP table,都在memory内。
Stroed procedure 的功能就是把几个millions records 级别的表join在一起,做一些
很简单判别,加减,再写进原来的表或不同的表。
这样的stored procedure有20多个,用linux cron job,每晚跑一次。
如果PL SQL stored procedure 用TEMP table, 转变从TSQL到PLSQL就很容易。不用的
话,大的stored procedure还是挺complex的。 |
|
c*********e 发帖数: 16335 | 31 data warehouse里面,所有dimension table的数据要拷贝到新的fact table里面,觉
得这做法比较傻。
我知道这其实是想一劳永逸,只copy一次就够了。但是,table和table之间,应该用
foreign key之类的来维持数据的一致和可靠,这种copy已经脱离了relational
database的本意。 |
|
c*********e 发帖数: 16335 | 32 data warehouse里面,所有dimension table的数据要拷贝到新的fact table里面,觉
得这做法比较傻。
我知道这其实是想一劳永逸,只copy一次就够了。但是,table和table之间,应该用
foreign key之类的来维持数据的一致和可靠,这种copy已经脱离了relational
database的本意。 |
|
c*********e 发帖数: 16335 | 33 dimension table里并没有数据,只有一些dimension的数据,比如location dimension
table,就只有location id,location name,location description.其它就没有了。数
据还是在staging table里,通过join之类的最终导入fact table. |
|
l******9 发帖数: 579 | 34 I need to print out a group of values from a procedure on SQL server 2008.
If I use select , it generated a distinct table into the result part of SQL
server 2008 managemetn studio every time the procedure is called.
i need to call the procedure in a loop. I want to print the values into one
table.
Thx!
while
begin
my_procedure()
end
my_procedure()
# do something
select value1, value2, value3
i need to keep the
value1, value2, value3
in one single table after the loop is don... 阅读全帖 |
|
l******9 发帖数: 579 | 35 On SQL Server 2008 R2, I need to add some columns into a table from another
table.
e.g.
Table1:
name value id
Jim 288 abf
Table 2:
name acct num rank
Jim 12 29 8
Jim 98 95 7
Jim 20 52 9
What I need:
name value id acct num rank acct num rank acct num rank
Jim 288 abf 12 29 8 98 95 7 20 52 9
The record numbers in table 2 may be variable.
Any help would be appreciate. |
|
s******e 发帖数: 51 | 36 在 database 中 “学生” table 中的 primary key 学生ID是系统自动生成数字。我
想把它改成source table 中的学生ID 以便和其它table 连接起来。 I tried to
create another table without an identity property. However, I keep getting
errors like cannot update identity column。
How can I avoid these errors, and also efficiently replace an entire column
of primary keys with another column ?谢谢! |
|
T*****e 发帖数: 361 | 37 【 以下文字转载自 BuildingWeb 讨论区,原文如下 】
发信人: ThatOne (ThatOne), 信区: BuildingWeb
标 题: 问个用table控制版面的问题
发信站: Unknown Space - 未名空间 (Sun Mar 27 11:09:15 2005) WWW-POST
想要的效果就是把一个网页的内容分为上、中、下三部分,
分别是header, contents, and footer,并且header紧靠
页面顶端,然后是内容,而footer则紧靠页面底端。
实现的思路是:
1 html body高、宽都设为100%
2 第一个table上下两格,上格嵌套一个table用来放
header和内容,向上垂直对齐;下格放footer,向下垂直
对齐。这个table高宽都为100%。
3 嵌套的table也是上下两格,上格放header,下格放内
容。
html代码附后。
问题:在IE中看着好像没有问题,但是FireFox中footer还是
紧靠在内容后面,并没有紧贴页面底端。使用DOM Inspector
发现 |
|
c**t 发帖数: 2744 | 38 In access, we have a linked table Blah, links to some oracle table. Now the
tns name changed, I need update the linkage. Tried linked table manager, can
see the linked table; But the design view, table property still shows old
tsn name. How to update the tsn name? |
|
b******n 发帖数: 592 | 39 基本上就是把key用hash函数转化为index,然后用这个index再table中locate。
Add: (key, value)
key -> index
is table[index] empty?
yes, add key,value
no, is table[index+1] empty? 假设你不删除,不然用list来解决不同key映射到同
index
...
Find: (key)
key -> index
is table[index].key == key?
yes, return value
no, is table[index+1].key == key?
.....
这是我最常用的设计。 |
|
l******9 发帖数: 579 | 40 On SQL Server 2008 R2, I need to add some columns into a table from another
table.
e.g.
Table1:
name value id
Jim 288 abf
Table 2:
name acct num rank
Jim 12 29 8
Jim 98 95 7
Jim 20 52 9
What I need:
name value id acct num rank acct num rank acct num rank
Jim 288 abf 12 29 8 98 95 7 20 52 9
The record numbers in table 2 may be variable.
Any help would be appreciate. |
|
g*****d 发帖数: 35 | 41 Hi,
I am using the floatflt package. It offers floating figures and tables.
However, for the floating table, I can only put the caption below the table
but not above. How to make it above the table? Thank you very much. I list the
normal usage that may be useful for others also.
\usepackage{floatflt}
The following works for appending the caption below the table
\begin{floatingtable} [r]
{
\begin{tabular}[c]{|l|l|l|l|l|}
\hline
Application & column0 & c1 & c2& c3\\
\hline\hline
good1 & 8 & 7 & 6 |
|
l******9 发帖数: 579 | 42 【 以下文字转载自 Statistics 讨论区 】
发信人: light009 (light009), 信区: Statistics
标 题: SQL check likeness between two large tables
发信站: BBS 未名空间站 (Tue May 6 15:38:29 2014, 美东)
I need to check the likeness between two data tables on SQL. I am working on
Aginity Workbench for Netezza on Win 7.
The tables are very large. One of them has 100 million rows and 4 columns;
another one has 1500 million rows and 3 columns.
Example, table1
ID1 ID2 ID3 Value
xxxx xxxxxx xxxxxxxx xxx.xxxxxx ... 阅读全帖 |
|
l******9 发帖数: 579 | 43 【 以下文字转载自 Statistics 讨论区 】
发信人: light009 (light009), 信区: Statistics
标 题: SQL check likeness between two large tables
发信站: BBS 未名空间站 (Tue May 6 15:38:29 2014, 美东)
I need to check the likeness between two data tables on SQL. I am working on
Aginity Workbench for Netezza on Win 7.
The tables are very large. One of them has 100 million rows and 4 columns;
another one has 1500 million rows and 3 columns.
Example, table1
ID1 ID2 ID3 Value
xxxx xxxxxx xxxxxxxx xxx.xxxxxx ... 阅读全帖 |
|
h******5 发帖数: 58 | 44 Step#1: copy into new table from old table
Insert new_table
Select * from old_table
Step#2: add a column in the new table
Alter TABLE new_table
Add COLUMN new_column
建议:问问题也要动动脑筋怎么让别人容易明白你想要什么。你那堆东西没人看的懂所
以也就没人来回答你。你要是弄个简单的图在excel里,然后截张图片上来就一目了然
了。 help us to help you! |
|
h******5 发帖数: 58 | 45 Step#1: copy into new table from old table
Insert new_table
Select * from old_table
Step#2: add a column in the new table
Alter TABLE new_table
Add COLUMN new_column |
|
l******9 发帖数: 579 | 46 On SQL Server 2008 R2, I need to add some columns into a table from another
table.
e.g.
Table1:
name value id
Jim 288 abf
Table 2:
name acct num rank
Jim 12 29 8
Jim 98 95 7
Jim 20 52 9
What I need:
name value id acct num rank acct num rank acct num rank
Jim 288 abf 12 29 8 98 95 7 20 52 9
The record numbers in table 2 may be variable.
Any help would be appreciate. |
|
l******9 发帖数: 579 | 47 am trying to access SQL server 2008 R2 from Eclipse pydev ( python 3.2 ) on
win7 .
I need to create a table on database.
The code can be run well. But, I cannot create tables in the database. If I
print the sql string and run the query from SQL server management studio, no
problems.
import pyodbc
sql_strc = " IF OBJECT_ID('[my_db].[dbo].[my_table]') IS NOT NULL n"
sql_strc1 = " DROP TABLE [my_db].[dbo].[my_table] n"
sql_stra = " CREATE TABLE [my_db].[dbo].[my_table] n"
sql_stra1 = "(n"
sql_stra... 阅读全帖 |
|
w**********a 发帖数: 107 | 48 【 以下文字转载自 Statistics 讨论区 】
发信人: wakakayikaka (哇咔咔一咔咔), 信区: Statistics
标 题: Pivot table SOS
发信站: BBS 未名空间站 (Thu Jan 21 16:36:22 2016, 美东)
I have a question on excel pivot table.
Here is my data set
Company profit
A 1
A 1
A -1
A -2
A 3
B 1
B 1
B 1
C -2
The pivot table I need is as follows:
Positive
A: 1
B: 3
Negative
C: -2
The pivot table I can get is
Positive
A: 4
B: 3
Negative
A: -3
C: -2
... 阅读全帖 |
|
z*********o 发帖数: 541 | 49 The following SAS program is submitted:
proc freq data = sales;
A00-211
- 31 - http://www.ePlanetLabs.com
run;
Click the Exhibit button to view the output from the FREQ procedure.
Which one of the following statements completes the program and produces
the output?
A. tables region product;
B. tables region * product;
C. tables product region;
D. tables product * region;
Answer: B
C 为何不对呢?c可以解释为只对variables products and region做分析。错的原因在
哪呢? |
|
t********1 发帖数: 799 | 50 my boss needs a simple table including several numbers which are updated
each hour. right now my program is ready to get the updated table each hour.
my question is how to send this table out each hour, and this table should
be in the email body(whatever real excel table or snapshot?
Thank you very much !! |
|