Viewing 15 posts - 7,921 through 7,935 (of 8,731 total)
Just as you posted, no need to call xp_cmdshell.
July 15, 2013 at 1:07 pm
That's because xp_cmdshell expects an MS-DOS command and you're sending a T-SQL command.
July 15, 2013 at 11:43 am
Just another way of doing it.
select *
from dept d
WHERE NOT EXISTS( SELECT 1 FROM empp e WHERE e.dept = d.dname)
July 15, 2013 at 10:17 am
Why won't you order by the original orderdate?
In case you can't, try to convert it with a different format in the ORDER BY (such as 120 or 112).
July 15, 2013 at 9:47 am
That's correct.
Remember to do it in the correct order.
July 14, 2013 at 10:53 pm
I believe that you have to add WITH NORECOVERY for every backup until the last log backup restore which will use WITH RECOVERY.
What's exactly your problem?
July 14, 2013 at 5:30 pm
You could create a trigger for insert
CREATE TRIGGER TI_Locations ON Locations
AFTER INSERT
AS
INSERT INTO _NewLocations (LocationID, LocationName,AreaID)
SELECT LocationID, LocationName, AreaID
FROM Inserted
July 14, 2013 at 5:00 pm
You could as well try to use the 8k Splitter presented here.
http://www.sqlservercentral.com/articles/Tally+Table/72993/
It will return you a table from which you can do a join or semi-join (IN or EXISTS). 😉
July 14, 2013 at 4:31 pm
Does this article helps you?
July 14, 2013 at 3:54 pm
Sean Lange (7/12/2013)
WolfgangE (7/12/2013)
The object explorer might throw some errors when expanding the...
July 14, 2013 at 3:25 pm
If you're running only on Mondays, these formulas might help you. If the day can vary, you might need an additional operation.
select DATEADD( hh, 7, DATEADD( dd, DATEDIFF( dd, 0,...
July 14, 2013 at 2:53 pm
Another solution would be to use bcp that will allow you to export tables to text files or import these text files as well.
If you like graphic interfaces you could...
July 14, 2013 at 1:16 pm
Without more information, I would say you could do it like this.
CREATE function [dbo].[myfunc]
returns table
AS
return
select d = (isnull(sum(d.cola),0)+@c) * -1
from (Select distinct c.cola
from tab1...
July 14, 2013 at 1:09 pm
Thank you for the sample data, however, we're still missing the information for table GLCTA.
July 13, 2013 at 2:29 pm
Can you post the table definition? I'm afraid that there are some Unicode characters in the data that Excel won't identify.
July 13, 2013 at 12:03 pm
Viewing 15 posts - 7,921 through 7,935 (of 8,731 total)