由买买提看人间百态

topics

全部话题 - 话题: col9
(共0页)
n********6
发帖数: 1511
1
Environment: Win2003, SQL2005,
Process: Load .xls by using SSIS Wizard (DB->Task->Import Data)
.xls File Structure: (col1, col2, ..., col8, col9)
Columns: col8:numbers; col9: numbers
First Line: xx, xx,... xx, xx (to set col8, col9 character)
Loading result:col1, col2, ... col8 (nvarchar), col9(float)
Question: Why col8 nvarchar while col9 float?
Thank you.
h******y
发帖数: 25
2
来自主题: Database版 - 请问sql 有条件性的select columns
具体例子如下:
select * from table -- gives the following output
server col2 col3 col4 col5 col6 col7 col8 col9 col10
1 1234 null null 678 987 890 null 567 null
1 4565 null null 234 67 56 null 345 null
2 null null 578 567 234 null 73 18 null
2 null null 626 289 395 null 84 399 null
3 567 null 845 null 987 674 null null... 阅读全帖
a*********u
发帖数: 1463
3
来自主题: Database版 - 问个sql/ ssis的问题 谢谢!
有两个sql server table
table1 (col1, col2, col3 ... col9)
table2 (cola, colb, colc)
目的是弄一个 excel table3
包含col1, col2, col3, col5, col6, colc
colc的值是当tbl1.col1=tbl2.cola and tbl1.col2 = tbl2.colb
我现在的想法是
select col1,col2,col3, col5, col6, 0 as colc from tbl1 into temp_tbl1
update temp_tbl1
set temp_tbl1.colc = tbl2.colc
from temp_tbl1
inner join tbl2
on (temp_tbl1.col1 = tbl2.cola and temp_tbl1.col2 = tbl2.colb)
然后再用ssis 把数据弄到excel里
请问还有什么简单易操作的方法吗
谢谢
i*******d
发帖数: 81
4
来自主题: Database版 - 请问sql 有条件性的select columns
why data appears in pairs? is it always true?
What is the desired output if you have:
server col2 col3 col4 col5 col6 col7 col8 col9 col10
1 1234 null null 678 987 890 null 567 null
1 null null null 234 67 56 null 345 null

null
null
null
648
921
(共0页)