Forum Replies Created

Viewing 15 posts - 7,921 through 7,935 (of 8,731 total)

  • RE: Truncating data on a remote Server

    Just as you posted, no need to call xp_cmdshell.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Truncating data on a remote Server

    That's because xp_cmdshell expects an MS-DOS command and you're sending a T-SQL command.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: need solution and feedback to the below question!!

    Just another way of doing it.

    select *

    from dept d

    WHERE NOT EXISTS( SELECT 1 FROM empp e WHERE e.dept = d.dname)

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Get date only and order by in correct way

    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).

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Restoring diff backup problem

    That's correct.

    Remember to do it in the correct order.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Restoring diff backup problem

    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?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Downgrade INSERT with OUTPUT to Sql Server 2000

    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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Spliting a comma delimited parameter from Crystal

    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). 😉

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Spliting a comma delimited parameter from Crystal

    Does this article helps you?

    http://www.sqlservercentral.com/articles/T-SQL/63003/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: management studio

    Sean Lange (7/12/2013)


    WolfgangE (7/12/2013)


    As far as I've seen you can connect from a Management Studio 2008 to a SQL 2012 instance.

    The object explorer might throw some errors when expanding the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: previous week query 0700 - 0700

    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,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How to take backup of Single table and how to restore?

    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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Convert scalar function to Table Valued func

    Without more information, I would say you could do it like this.

    CREATE function [dbo].[myfunc]

    ( @a int, @b-2 int, @c money)

    returns table

    AS

    return

    select d = (isnull(sum(d.cola),0)+@c) * -1

    from (Select distinct c.cola

    from tab1...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: complex joins retrive the echivalent results

    Thank you for the sample data, however, we're still missing the information for table GLCTA.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Boxes symbol in query output

    Can you post the table definition? I'm afraid that there are some Unicode characters in the data that Excel won't identify.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 7,921 through 7,935 (of 8,731 total)