Convert SQL Server result set into string

I am getting the result in SQL Server as

SELECT StudentId FROM Student WHERE condition = xyz

I am getting the output like

StudentId
1236

7656

8990
........

The output parameter of the stored procedure is @studentId string and I want the return statement as

1236, 7656, 8990.
--First Way
DECLARE @result varchar(1000)

SET @result = ''

SELECT @result = @result + StudentId + ',' FROM Student WHERE condition = xyz

select substring(@result, 0, len(@result) - 1) --trim extra "," at end
 
—Second Way
 DECLARE @result NVARCHAR(MAX)

 SELECT @result = STUFF(
                        (   SELECT ',' + CONVERT(NVARCHAR(20), StudentId) 
                            FROM Student 
                            WHERE condition = abc 
                            FOR xml path('')
                        )
                        , 1
                        , 1
                        , '')
 
--Third Way
DECLARE @StudentID VARCHAR(1000)
SELECT @StudentID = COALESCE(@StudentID + ',', '') + StudentID
FROM Student
WHERE StudentID IS NOT NULL and Condition='XYZ'
select @StudentID
--Source: http://stackoverflow.com/questions/4819412/convert-sql-server-result-set-into-string
張貼在 SQL -- Program | 發表留言

Informatica 日期格式轉換

EX: 2013010100
SUBSTR(TO_CHAR(in_CreatedDate),5,2)  || ‘/’ || SUBSTR(TO_CHAR(in_CreatedDate),7,2)  || ‘/’ || SUBSTR(TO_CHAR(in_CreatedDate),1,4)

EX: 01-01-2013 00:00:00.000
SUBSTR(TO_CHAR(in_CreatedDate),1,2)  || ‘/’ || SUBSTR(TO_CHAR(in_CreatedDate),4,2)  || ‘/’ || SUBSTR(TO_CHAR(in_CreatedDate),7,4)

張貼在 Informatica | 發表留言

Informatica – Exp/Query editor missing (Dual Monitor issue)

If you happen to be one of those developers who use dual Monitors at work ,here is a problem that might drive you crazy

It is surprising that it hasn’t been fixed (atleast as of version 8.6.1), considering the widespread use of multiple monitors by developers now.

Reproducing the case

  • Open one of Informatica Clients (Designer, Workflow Manager) and a mapping/session.
  • Open the sql/expression editor for any of the above. Example (i) if you are working with a source Qualifier, opens the SQL Override (ii) If you are using an expression editor, open the editor for the expression transformation for any of the ports.
  • Without moving the entire client, move just the editor to the extended monitor.
  • Make your changes and close it. The next time you open the editor in the primary monitor, you should see this problem.

These are a couple of screen shots of how your Expression / editor might look like when you have this problem.

Query Editor Missing — Dual Monitor Issue.

Expression editor missing – Dual Monitor Issue

This is NOT TO BE CONFUSED with the mapping that is currently checked in and hence the editor is disabled which would look like the picture below.

Checked In Object (versioning)

In this case, all you’d need to do is check out the mapping in your name before making changes (or) work with any other developer who has that checked it out in his name. You can right click on the object and Choose Versioning>view history to see what is currently going on with the object’s versioning.

Fix :

Other than reinstalling the Informatica Client (which seems to be the popular fix) , there is a simpler fix which involves changing your registry entries that will get rid of this error.

Please make sure you export your current registry settings before you do this. It is always recommended to do this no matter what’s the reason for which you are modifying your registry settings. Once in the registry editor, click on File>Export and save the registry before moving on.

  • Go to your command line and type regedit.
  • Go to HKEY_CURRENT_USER\Software\Informatica\PowerMart ClientTools\<8.6.1>\Designer\Options\Global\Editor\SQL (this of course is for 8.6.1 and if the issue is with the designer. If you have a different version and if the issue with the workflow designer, replace the appropriate directory locations).
  • Change the values of the following entries to “0”.
  1. Expression Editor Position
  2. Expression Editor Splitter Position
  3. SQL Editor Position
  4. SQL Editor Splitter Position

Since the registry entry is binary (Type : REG_BINARY), you’ll need to enter the values “00” 16 times (2 bytes) to make the value zero.

Here is how my registry entry looked initially….And after the change

Before…

Windows registry entry Before — Dual Monitor issue

After….

Windows Registry entry after — Dual monitor issue

Make similar edits to all 4 parameters, close the regedit file, and reopen your designer.

Informatica Dual Monitor issue – After the fix.

This issue should be fixed now.

–copy from: http://www.etl-developer.com/2010/12/informatica-expquery-editor-missing-dual-monitor-issue/

張貼在 Informatica | 發表留言

查詢 Partition Table 相關資訊

1.判斷資料表是否已分割
SELECT * 
FROM sys.partitions AS p
JOIN sys.tables AS t
ON p.object_id = t.object_id
WHERE p.partition_id IS NOT NULL
AND t.name = ‘pt_test’—- your table name

2.取得某一資料的資料分割編號
–PF_test_SaleTime = your partition function
SELECT $PARTITION.PF_test_SaleTime (’1990-01-01′) ;

3.取得每個資料分割筆數(is not null)
SELECT $PARTITION.PF_test_SaleTime(SaleTime) AS Partition, 
COUNT(*) AS [COUNT] FROM pt_test
GROUP BY $PARTITION.PF_test_SaleTime(SaleTime)
ORDER BY Partition ;

4.取得 partition table 分割界限值
–pt_test = your partition table name
SELECT t.name AS TableName, i.name AS IndexName,r.value AS BoundaryValue , p.partition_number, p.partition_id, i.data_space_id, f.function_id, f.type_desc, r.boundary_id
FROM sys.tables AS t
JOIN sys.indexes AS i
    ON t.object_id = i.object_id
JOIN sys.partitions AS p
    ON i.object_id = p.object_id AND i.index_id = p.index_id 
JOIN sys.partition_schemes AS s
    ON i.data_space_id = s.data_space_id
JOIN sys.partition_functions AS f
    ON s.function_id = f.function_id
LEFT JOIN sys.partition_range_values AS r
    ON f.function_id = r.function_id and r.boundary_id = p.partition_number
WHERE t.name = ‘pt_test’ AND i.type <= 1
ORDER BY p.partition_number;

5.取得 partition column
SELECT t.object_id AS Object_ID, t.name AS TableName, ic.column_id as PartitioningColumnID, c.name AS PartitioningColumnName 
FROM sys.tables AS t
JOIN sys.indexes AS i
ON t.object_id = i.object_id
JOIN sys.columns AS c
ON t.object_id = c.object_id
JOIN sys.partition_schemes AS ps
ON ps.data_space_id = i.data_space_id
JOIN sys.index_columns AS ic
ON ic.object_id = i.object_id AND ic.index_id = i.index_id AND ic.partition_ordinal > 0
WHERE t.name = ‘pt_test’
AND i.type <= 1
AND c.column_id = 1;
另一位網友方法
select 
OBJECT_NAME(i.object_id), c.name from sys.index_columns i join sys.columns c on i.object_id = c.object_id
and i.column_id = c.column_id where partition_ordinal = 1
 
6.取得某資料分割中的資料
–傳回資料分割=2 相關資料
SELECT * FROM pt_test
WHERE $PARTITION.PF_test_SaleTime(SaleTime) = 2 ;

7.取得所有 partition table的 partition function 、scheme和column name
SELECT OBJECT_NAME(p.OBJECT_ID) TableName,    
c.name PartColumn,
ps.name PartScheme,    
pf.name PartFunction
FROM sys.data_spaces  d JOIN      
sys.indexes i JOIN
(SELECT DISTINCT OBJECT_ID     
FROM sys.partitions
WHERE partition_number > 1) p    
ON i.OBJECT_ID = p.OBJECT_ID
ON d.data_space_id = i.data_space_id     
JOIN sys.partition_schemes ps ON d.data_space_id = ps.data_space_id
JOIN sys.partition_functions pf ON ps.function_id = pf.function_id      
JOIN sys.index_columns ic ON i.index_id = ic.index_id AND i.OBJECT_ID = ic.OBJECT_ID
JOIN sys.columns c ON c.OBJECT_ID = ic.OBJECT_ID AND c.column_id = ic.column_id

--轉載:http://mobile.dotblogs.com.tw/ricochen/archive/2012/05/04/71971.aspx
張貼在 SQL -- Admin, SQL -- Program | 發表留言

Partition Function 與 Partition Scheme

寫了 Partition Table ( 『SQL』分割資料表 Partition Table),卻沒交代 Partition Function (PF) 與 Partition Scheme (PS) 怎麼來的,一整個覺得怪怪的,總覺得少了什麼,所以再寫了這篇,簡單說明一下 PF 與 PS 的寫法。

要寫總要有些測試資料,就從 AdventureWorks2008 做一下

一開始有504筆測試資料,我將以他的「ReorderPoint」作為切割的依據

第1步:建立切割函數 Partition Function

CREATE PARTITION FUNCTION [pf_product](smallint) AS RANGERIGHT FOR VALUES (300, 500, 700)

先觀察一下你想要切割的欄位,例如我是用「ReorderPoint」 作為切割,這個欄位型態為 「smallint」,所以在定義 PF 時就會宣告為 (smallint)

第2步:建立分割配置 Partition Scheme

CREATE PARTITION SCHEME [ps_product] AS PARTITION [pf_product]TO ([fg1], [fg2], [fg3], [fg4])

將 PF 的切割方法 apply 到檔案群組 File Groups

第3步:在真正對 data 做資料分群時,可以先測試看看 PF 與 PS 是否設定妥當,也就是資料是否能如願的平均分攤到每個檔案群組(這時只是測試,還沒分割唷)

SELECT $partition.pf_product(ReorderPoint) as 分割區塊,count(ProductID) AS 筆數

FROM dbo.product

group by $partition.pf_product(ReorderPoint)

order by 1


覺得ok了,便可以真的對資料做分群囉

SSMS Step 1:在 SQL 管理介面

SSMS Step 2:選擇欄位

SSMS Step 3:選擇 PF

SSMS Step 4:選擇 PS

SSMS Step 5:決定 Boundary,預設為 PF 所指定之值

SSMS Step 6:立即執行,當然你也可以產生 Script 出來

SSMS Step 7:最後確認

SSMS Step 8:執行成功完成

SSMS Step 9:來個小段 T-SQL 測試一下,利用 System View 「sys.Partitions」

由於畫面跟前一篇完全一樣,所以這篇都只用部分截圖。

——————–

最後來看一下執行計畫(不懂請看 執行計畫 Execution Plan )。底下有兩張圖分別為一個有用 partition 另一個則無,執行 Cost 分別為 0.01590 與 0.00828,哪個快?當然是 Cost 小的囉!

哪個是有用 Partition ?答案是 0.01590 的執行

怎麼越切割執行效率越差呢?其原因是筆數不大時(本例為504筆),用了分割,反而多花時間從每個分割區將資料撈出再統合!

~ End

那……其 apply 到 Table 的 partition script 長什麼樣子呢?

USE [PTdb]

GO

BEGIN TRANSACTION

CREATE CLUSTERED INDEX[ClusteredIndex_on_ps_product_634020582217726096] ON[dbo].[product]

(

    [ReorderPoint]

)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF,DROP_EXISTING = OFF, ONLINE = OFF) ON[ps_product]([ReorderPoint])

DROP INDEX [ClusteredIndex_on_ps_product_634020582217726096]ON [dbo].[product1] WITH ( ONLINE = OFF )

COMMIT TRANSACTION

–轉載: http://blog.xuite.net/tolarku/blog/31088968-%E3%80%8ESQL%E3%80%8FPartition+Function+%E8%88%87+Partition+Scheme

張貼在 SQL -- Admin | 發表留言

Common Key Terminology

  • Key. A key is one or more data attributes that uniquely identify an entity. In a physical database a key would be formed of one or more table columns whose value(s) uniquely identifies a row within a relational table.

  • Composite key.  A key that is composed of two or more attributes.

  • Natural key.  A key that is formed of attributes that already exist in the real world. For example, U.S. citizens are issued a Social Security Number (SSN) that is unique to them (this isn’t guaranteed to be true, but it’s pretty darn close in practice). SSN could be used as a natural key, assuming privacy laws allow it, for a Person entity (assuming the scope of your organization is limited to the U.S.).

  • Surrogate key.  A key with no business meaning.

  • Candidate key.  An entity type in a logical data model will have zero or more candidate keys, also referred to simply as unique identifiers (note: some people don’t believe in identifying candidate keys in LDMs, so there’s no hard and fast rules).  For example, if we only interact with American citizens then SSN is one candidate key for the Person entity type and the combination of name and phone number (assuming the combination is unique) is potentially a second candidate key. Both of these keys are called candidate keys because they are candidates to be chosen as the primary key, an alternate key  or perhaps not even a key at all within a physical data model.

  • Primary key.  The preferred key for an entity type.

  • Alternate key. Also known as a secondary key, is another unique identifier of a row within a table.

  • Foreign key. One or more attributes in an entity type that represents a key, either primary or secondary, in another entity type.

–轉載: http://www.agiledata.org/essays/keys.html

張貼在 SQL -- Admin | 發表留言

使用SSIS创建同步数据库数据任务

下面我使用SSIS来演示一个实际例子。比如我有一个数据库,出于备份数据或者其它的目的,会定期的对这个数据库的数据迁移到其它的数据库去。迁移的时候,有些新增的字段会被插入备份数据库,而有些被修改过的字段也会在备份数据库被修改。现在我们就用SSIS来完成这项任务。

首先在我源数据库db_source和目标数据库db_destination中运行以下SQL创建好需要的表,就以这一个表test_1来进行示范。

CREATE TABLE [dbo].[test_1](
    [Id] [int] IDENTITY(1,1) NOT NULL primary key,
    [Name] [varchar](50) NULL,
    [Age] [int] NULL
)

建好表好在源数据表中可以随便加几条记录,目标数据库暂时留空。

现在我们打开VS,创建一个Intergration Services Project。(注意:如果SQL Server 装的是Express版的话是没有这个项目工程模板的)

创建好工程后,在Control Flow这个Tab下拖入一个Data Flow Task,如下图:

双击这个Data Flow Task,我们就会进入Data Flow这个Tab标签中。

然后我们在左边工具栏里找到OLE DB Source,继续拖两个OLE DB Source出来。分别给它们命名为Source DB和Destination DB。

将数据源拖出来后,双击它,可以对它进行一些设置,主要就是链接数据库及选择你要进行迁移的表或者视图等设置,这里我就不详细说明了。注意一点的是就像上图所示,如果一个图形上出现一个红X的话说明设置有错误。

再来就是拖两个Sort及一个Merge Join出来,将之前的数据源箭头分别指向两个Sort,最后两个Sort出来的数据同时输入Merge Join中。

分别双击两个Sort,钩选表中的ID,对ID这个字段进行一次排序。因为Merge Join这个流程要求输入的数据是已排序好的。这个排序也可以直接在数据源中对它们的输出字段设置SortKeyPosition这个属性来排序。(详见:http://msdn.microsoft.com/zh-cn/library/ms137653.aspx

这里我们第一次从Sort拉箭头到Merge Join的时候,会让我们选择这个输入的数据是作为左输入还是右输入,我们按照图示的那样,左边的作为左输入,右边的作为右输入。然后我们双击Merge Join,按照如下图所示设置:

这里打钩的是这个流程之后输出的数据,Join Type需要选择为Left outer join,因为左边是我们的原始数据表,右边是我们备份的表,右表可以看成是一个左表的一个子集,如果左表有的数据,右表没有的,那些就是需要新插入备份数据库的数据。

现在我们需要一个分支,即新的数据需要插入备份数据库中,而已有的数据需要更新为新的值。我们从工具栏中拖入一个Conditional Split来进行这样的分支处理。我们将Merge Sort中的输出指向Conditional Split,然后双击Conditional Split,如下图所示设置(注意条件一个是ISNULL,一个是非ISNULL)。

这时它们的输入值就被分成两种条件输出,最后我们再拖入一个OLE DB Destination来插入数据和一个OLE DB Command来更新数据库,最终流程如下图:

双击设置OLE DB Destionation,选择好数据导入的目标数据库中的表,这里需要注意的就是要钩选Keep identity这个选项,因为我创建表的时候对ID字段使用了自增属性。

双击设置OLE DB Command,首先在Connection Managers这个Tab中选择好链接对象,然后在Component Properties这个选项卡中,设置你的SqlCommand属性。如下图:

这里的参数值都是用?号来代替,之后在Column Mappings这个Tab中设置代替值实际代替的列,如下图:

至此,任务就创建完毕了,没有编写任何代码,直接拖拉完成了。现在可以直接在VS中按F5运行看下效果,我们的目标数据表将插入源数据表中的值。然后我们修改一下原数据表,再来运行一下上面这个任务,就可以在目标数据库中看到更改了。

–轉載:http://www.cnblogs.com/heqichang/archive/2012/09/19/2693214.html

張貼在 SQL -- SSIS | 發表留言

SQL error: String or binary data would be truncated.

在某些 SQL server 執行 insert into 時,會發生 “String or binary data would be truncated." 錯誤, 原因是資料長度不符 TABLE 欄位長度.但有些 server 卻不會出現錯誤, 原因是選項 ANSI_WARNINGS 打開.

當 SET ANSI_WARNINGS ON 時, Insert/Update 會依ISO標準的指定加以取消, 字元資料尾端空格會被忽略, 二進位資料行尾端的 NULL也會被忽略, 所以不會出現錯誤.

Refer: http://msdn.microsoft.com/zh-tw/library/ms190368.aspx

張貼在 SQL -- Admin, SQL -- Program | 發表留言

INFORMATICA函数之二字符串函数

1.   ASCII函数
格式:ASCII(STRING)
返回类型:DECIMAL
功能:返回传入字符串的一个字符的ASCII码值
使用:  ASCII(‘A’)  返回65

2.   CHOOSE函数
格式:CHOOSE(INDEX,STRING1,[STRING2,STRINGn])
返回类型:STRING
功能:返回INDEX指定的那个STRING
使用: CHOOSE(1,‘A’,’B’)  返回A
         CHOOSE(2,’abc’,’ccc’) 返回ccc
         CHOOSE(3,’A’,’B’)  返回NULL

3.   CHR函数
格式:CHR(number)
返回类型:CHAR
功能:返回传入的ASCII码数字对应的字符
使用:  ASCII(65)  返回A

4.   CHRCODE函数 格式:CHRCODE (STRING)
返回类型:DECIMAL
功能:如果integration service运行在ASCII模式下,返回传入字符串的一个字符的ASCII码值,如果integration service运行在UNICODE模式下,返回传入字符串的一个字符的UNICODE码值
使用:  CHRCODE(‘AAA‘)  返回65
说明: 这个函数可以代替ASCII()函数,推荐优先使用这个函数

5.   CONCAT函数 格式:CONCAT (STRING1,STRING2)
返回类型:STRING
功能:将STRING1和STRING2连接成一个字符串返回
使用:  CONCAT(‘AAA‘,’BBB’)  返回AAABBB

6.   INDEXOF函数 格式:INDEXOF (valueToSearch,STRING1,[STRING2,STRING3,STRINGn], CaseFlag)
返回类型:int
功能:在STRING1到STRINGn的字符串队列中中匹配字符串valueToSearch,如果匹配到,返回字符串的顺序号码,如果没有匹配的,则返回0, 当没有指定CaseFlag的时候,默认区分大小写,当CaseFlag指定为0时候,表示不区分大小写,为其他数字值的时候,表示区分大小写
使用:  INDEXOF(‘AAA’,’BBB’,’CCC’,’AAA’) ,返回3
       INDEXOF(‘AAA’,’BBB’,’CCC’,’aaa’) ,返回0
       INDEXOF(‘AAA’,’BBB’,’CCC’,’aaa’,0) ,返回3

7.   INITCAP函数 格式:INITCAP (STRING)
返回类型:STRING
功能:将输入字符串的第一个字母变为大写,其他字符串变为小写,然后返回
使用:  INITCAP(‘AAA’) 返回Aaa

8.   INSTR函数 格式:INSTR (STRING, search_value , [start] , [occurrence])
返回类型:无匹配0,匹配返回position数字
功能:返回search_value在字符串STRING的位置,从start开始匹配,第occurrence次匹配到
使用:  INSTR(‘AAA’,’A’) 返回1
       INSTR(‘AAA’,’A’,2) 返回2
       INSTR(‘AAA’,’A’,2,2) 返回3
       INSTR(‘AAA’,’A’,2,3) 返回0

9.   LENGTH函数 格式:LENGTH (STRING)
返回类型:INTEGER
功能:将输入字符串的的字符个数
使用:  LENGTH(‘AAA’) 返回3
      LENGTH(‘AA  A’) 返回3

10.   LOWER函数 格式:LOWER (STRING)
返回类型:STRING
功能:返回输入字符串的小写形式
使用:  LENGTH(‘AAA’) 返回aaa

11.   UPPER函数 同LOWER函数,返回输入字符串的大写形式

12. LPAD函数 格式:LPAD (first_string, length,[second_string])
返回类型:STRING
功能:在first_sting的左面补上second_stirng直到字符串长度为length,如果没有second_string参数没有输入,则补空格
使用:  LPAD(‘AAA’,4) 返回空格AAA
            LPAD (‘AAA’,4,‘a’) 返回aAAA
             LPAD (‘AAA’,6,‘*#’) 返回*#*AAA

13.  RPAD函数
功能同LPAD,从右面开始补

14.  LTRIM函数 格式:LTRIM (string, [trim_set])
返回类型:STRING
功能:去掉string中最左面的trim_set字符或字符串,然后返回去掉后的字符串,如果trim_set参数没有输入,则去掉最左面的空格
使用:  LTRIM (‘AAA   ’) 返回AAA
          LTRIM(‘AAA’,’A’) 返回NULL     
          LTRIM (‘ABCD’,’AR’) 返回BCD

15. RTRIM函数 功能:同LTRIM,去掉最右面的字符串

16.  REPLACECHR函数 格式:REPLACECHR(CaseFlag, InputString, OldCharSet, NewChar)
返回类型:STRING
功能:CaseFlag是大小写敏感表示,等于0,表示不区分大小写,否则区分。函数的功能是在InputString中匹配OldCharSet中的单字符,匹配到了,用NewChar字符代替,然后返回。
使用: REPLACECHR(1,’[ABC]’,’ ] [“’,NULL]  返回ABC
    REPLACECHR(1,’ “GET /news/index.html HTTP/1.1″ ’,’ ] [“’,NULL] 返回GET /news/index.html TTP/1.1

17.  REPLACESTR函数 格式:REPLACECHR(CaseFlag, InputString, OldString1,[OldString2…,OldStringN], NewString)
返回类型:STRING
功能:基本和REPLACECHR相同,从InputString中匹配OldString1…OldStringN,匹配到了,用NewString代替,然后返回代替后的字符串

18. REVERSE函数 格式:REVERSE (string)
返回类型:String
功能:将输入STRING中的字符顺序颠倒,然后返回
使用:  REVERSE (‘ABC ’) 返回CBA

19.SUBSTR函数 格式:SUBSTR (STRING, start,[length])
返回类型:String
功能:从输入字符串STRING中的第start个字符开始取length个字符返回
使用:  SUBSTR(‘abcdefg’,2,3) 返回bcd

–Source: http://bbs.dwway.com/thread-25241-1-1.html

張貼在 Informatica | 發表留言

五招圖解 Google 搜尋密技

第一招─小試身手

想搜尋紐約時報在2008到2010年關於大學測試分數但不是SAT入學分數的文章?

Step1:若只想搜尋NYTIMES網站的資料,輸入site:nytimes.com
Step2:關鍵字前面加上波浪符號,輸入~college
Step3:將不可拆開的關鍵字用雙引號括起來,輸入”test scores”
Step4:不想納入的關鍵字前面加上負號,輸入-SATs
Step5:時間區間用兩個句點間隔,輸入2008..2010

想搜尋燕子飛行速度的專業報告?

Step1:若只想搜尋PDF檔案,輸入filetype:pdf
Step2:若只想搜尋文章的「標題」,例如:速度(velocity),關鍵字請輸入intitle:velocity
Step3:搜尋各式各樣的燕子(swallow),在燕子前加上*,輸入*swallow

第二招─研究生必殺技

想搜尋Dr. Ronald L. Green和Dr. Thomas P.Buttz關於光合作用(photosynthesis)的論文?

Step1:作者關鍵字,輸入author:green
Step2:主題關鍵字,輸入potosynthesis
Step3:想讓搜尋結果更明確,在關鍵字旁加入雙引號,在此加入作者的全名簡寫,輸入”tp buttz”

第三招─移行換單位

字詞定義
想找某個詞的定義,可以在關鍵字前輸入define:
例如:define:angary

數學計算
直接輸入數學運算式即可
例如:(2*3)/5+44-1

單位轉換
在想轉換的單位前加上in
例如:54 pounds in kilograms,中文也可:54磅in公斤

第四招─殺手鍵

在這裡一般鍵盤上為Ctrl 鍵,Apple的使用者則是用Command鍵(空白鍵旁邊的那顆):

在頁面上做關鍵字搜尋
只要同時按下Ctrl加上F,再輸入關鍵字,關鍵字就會被重點標注

頁面上放大縮小
同時按下Ctrl加上+或-,即可放大或縮小頁面和PDF檔的文件

選取頁面網址
同時按下Ctrl加上L,就可以直接切換到網址列並選取網址

分頁循環
Ctrl加上tab鍵,可以切換到瀏覽器下一個分頁

第五招─萬宗歸一心法

善用你的圖書館資料庫
Google也許是十分好用的工具,但也別忘了許多重要的文獻還是需要從專業的論文資料庫搜尋才找的到喔!

別引用維基百科
維基百科給我們相當大的方便做資料搜集,是一個很適合入門的地方,但裡面很多資料已經是缺乏來源引證的,但好的維基條目還是可以提供我們一些引用資料的線索。

找參考文獻
在數位或傳統的研究上,從書、論文或報告上的參考文獻下手是不會錯的,從文獻追溯,有機會找到更具重要性的資料。
即使Google如此方便,大家還是要動動腦、重新消化一番呀。可不要複製貼上大法,到時老闆也用五招密技找到一樣的資料,被抓包可就得不償失了。

(資料來源:mashable

–轉載: http://www.businessweekly.com.tw/blog/article.php?id=1029

張貼在 電腦和網際網路 | 發表留言