|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-05-31 : 09:59:58
|
| You mean you want to update a sybase database from a spreadsheet?Or are you extracting data from sybase into excel and want to output into sql server.As a first option I create insert statements for a temp table (using an expression in the spreadsheet copied down for each row) in excel then copy them into a query window.="insert #a select '" & SUBSTITUTE(A2,"'","''") & "','" & SUBSTITUTE(B2,"'","''") & "','" & SUBSTITUTE(C2,"'","''") & "','" & SUBSTITUTE(D2,"'","''") & "','" & SUBSTITUTE(E2,"'","''") & "','" & SUBSTITUTE(F2,"'","''") & "','" & SUBSTITUTE(G2,"'","''") & "','" & SUBSTITUTE(H2,"'","''") & "','" & SUBSTITUTE(I2,"'","''") & "','" & SUBSTITUTE(J2,"'","''") & "','" & SUBSTITUTE(K2,"'","''") & "','" & SUBSTITUTE(L2,"'","''") & "','" & SUBSTITUTE(M2,"'","''") & "'"==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|