Viewing 15 posts - 1,771 through 1,785 (of 3,544 total)
You can use
SELECT * FROM
OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;HDR=YES;Database=C:\temp\book1.xls', [sheet1$])
and use dynamic sql to substitute the workbook name
but beware that when SQL reads Excel files is uses the first few...
Far away is close at hand in the images of elsewhere.
Anon.
September 18, 2006 at 7:01 am
\\AS-B-CLI-000\c:\temp\test2.csv is an invalid UNC name
you need to replace the c: with a share name
eg \\AS-B-CLI-000\mysharename\temp\test2.csv
but SQL will require the neccessary rights to the share
You could use c$, which...
Far away is close at hand in the images of elsewhere.
Anon.
September 18, 2006 at 6:55 am
| ...old Narcissus... |
Less of the old
It'll be more like Sycophant 
Far away is close at hand in the images of elsewhere.
Anon.
September 15, 2006 at 7:12 am
A clone of myself ![]()
We'd get on so well and get the work done in a 1/4 of the time ![]()
Far away is close at hand in the images of elsewhere.
Anon.
September 15, 2006 at 7:00 am
SELECT c.[Date], c.Unit, c.Status
FROM [Table] c
INNER JOIN (SELECT a.[Date],a.Unit
FROM [Table] a
INNER JOIN [Table] b
ON b.Unit = a.Unit
AND b.Status = 'F'
AND b.[Date] >= a.[Date]...
Far away is close at hand in the images of elsewhere.
Anon.
September 13, 2006 at 8:41 am
Is there any duplicate data, ie does your READER table have multiple entries for multiple door entry
Far away is close at hand in the images of elsewhere.
Anon.
August 24, 2006 at 7:49 am
Make sure there is nothing pending on the connection, ie open recordset or use a separate connection
Far away is close at hand in the images of elsewhere.
Anon.
August 24, 2006 at 7:11 am
SELECT d.personname, d.[datetime], d.sys_nr, d.door_nr, r.[Door Reader]
FROM [DATEBOOK] d
INNER JOIN [READERS] r
ON r.sys_nr = d.sys_nr
AND r.door_nr = d.door_nr
should give you
personname datetime sys_nr door_nr Door Reader
myself ...
Far away is close at hand in the images of elsewhere.
Anon.
August 24, 2006 at 7:00 am
NULLIF(cell,'NULL')
Out of curiosity, what does the table's DDL look like and how do you wish to update the table, eg update query, EM
Far away is close at hand in the images of elsewhere.
Anon.
August 24, 2006 at 6:42 am
Use a view as Jeff decribes to strip out cr/lf and format data
use -c and -t parameters instead of format file
exec master..xp_cmdshell 'bcp "SELECT top 10000 * FROM myServer.DB.dbo.myView WHERE...
Far away is close at hand in the images of elsewhere.
Anon.
August 23, 2006 at 7:31 am
You could do it this way
WHERE @Check LIKE '''%' + CustomerID + '%'''
Far away is close at hand in the images of elsewhere.
Anon.
August 23, 2006 at 7:07 am
Either protect each divide using a CASE staement
or
see SET ARITHIGNORE in BOL (Books Online)
Far away is close at hand in the images of elsewhere.
Anon.
August 22, 2006 at 6:45 am
or
SELECT j.job_id
FROM [Jobs] j
INNER JOIN [Activities] a
ON a.job_id = j.job_id
GROUP BY j.job_id
HAVING COUNT(*) = 1
AND SUM(activity_type_id % 2) = 1
p.s. providing activity_type_id...
Far away is close at hand in the images of elsewhere.
Anon.
August 22, 2006 at 6:35 am
Duplicate post, see
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=302527
Far away is close at hand in the images of elsewhere.
Anon.
August 18, 2006 at 7:18 am
Duplicate post, see
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=302527
Far away is close at hand in the images of elsewhere.
Anon.
August 18, 2006 at 7:18 am
Viewing 15 posts - 1,771 through 1,785 (of 3,544 total)