Viewing 15 posts - 4,186 through 4,200 (of 7,191 total)
Yes, paste the code into notepad, edit it so that it's right for your environment, and save it as a .bat or .cmd file. Make sure the path to...
December 21, 2012 at 2:22 am
I would guess that you can't start a job remotely via a linked server. You could try using Powershell or SSIS instead. Or you could set up some...
December 21, 2012 at 2:17 am
Use a CASE expression in your SUM statement, something like this:
...
SUM(CASE WHEN Year = 2010 THEN Amount ELSE 0 END) AS Total2010,
SUM(CASE WHEN Year = 2011 THEN Amount ELSE 0...
December 20, 2012 at 6:52 am
In your attempt yesterday, you aliased your derived table with the name of table that already exists, which is confusing for me at least, if not for SQL Server. ...
December 20, 2012 at 5:47 am
Have you tried ALTER TRACE permission?
John
December 20, 2012 at 4:59 am
Is the SQL Server service running? What port does it listen on?
John
December 20, 2012 at 4:10 am
That's because there's no column of that name in your temp table. You need to break out your dates from the tale and join on those. That's why...
December 19, 2012 at 6:13 am
Your join is wrong. Try this:
SELECT so1.[Date&TimeofReading]
FROM #SPLITOUTDATA so1
LEFT OUTER JOIN TEST.DBO.d0003 d
on so1.[Date&TimeOfReading] = d.[Date&TimeOfReading]
WHERE d.[Date&TimeOfReading] IS NULL
John
December 19, 2012 at 5:41 am
No problem. What you need to do is LEFT JOIN the results of your SELECT DISTINCT statement to d0003 in the way that Scott showed you earlier. You'll...
December 19, 2012 at 4:51 am
OK, how many columns are in the table and how many values are you trying to insert? You didn't accidentally remove a comma from the SELECT DISTINCT list, did...
December 19, 2012 at 4:40 am
Take out the line of your current query that ends with "(AS [Date&TimeOfReading],", and replace it with my line. All I've done is STUFFed some colons into the date...
December 19, 2012 at 4:27 am
Excellent. Before we start, a couple of things I recommend you change if it's within your power. First, don't create and delete the Split_XML function every time. ...
December 19, 2012 at 4:02 am
Thanks. RUG_CLOB appears to be a staging table. Please can we see the DDL for the table with the Reading_Date column in?
John
December 19, 2012 at 3:34 am
Please will you post table DDL (a CREATE TABLE statement) and an example of a few rows that you are trying to import into the the database. What queries...
December 19, 2012 at 3:21 am
Choose your fill factor with performance in mind, not disk space. If disk space is the absolute priority, choose 0/100.
As I think you have realised, you must find time...
December 19, 2012 at 2:44 am
Viewing 15 posts - 4,186 through 4,200 (of 7,191 total)