Forum Replies Created

Viewing 15 posts - 7,906 through 7,920 (of 8,731 total)

  • RE: How to get the month wise row of record if transaction present or not

    This might not be the best way to achieve what you're looking for and might need some changes to adjust to your real data. However, this can be a start....

    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: Dynamic Pivot for multiple columns

    There are 2 great articles from Jeff Moden. Here's the part on dynamic pivoting

    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs[/url]

    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: Select All Records from Temporary Table and Assign to VARCHAR?

    You might want to try something like this

    Declare @msg varchar(8000),

    @TargetData varchar(max)

    Set @TargetData = "Target Project Name"

    Set @msg= 'Are you sure you wish to copy 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: error

    To correct the error, put the alias befor the WITH

    select * from tableA a with(nolock)

    join tableB b with(nolock)

    on a.id = b.id

    where a.date > getdate()

    You should as well be...

    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: delete rows

    You should do it in several batches. If you give us the code you're using, we might be able to help more. A simple example could be this.

    SELECT 1

    WHILE @@ROWCOUNT...

    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: reasons

    GilaMonster (7/16/2013)


    ramyours2003 (7/16/2013)


    what are the possible reasons for not truncating the log file ?

    There are no good reasons for not truncating the transaction log, unless you want to...

    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

    I'm glad I could help. It might not have been possible without the great articles from Jeff. 🙂

    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: List of when commands were introduced

    A new search brought the information for 2005.

    http://msdn.microsoft.com/en-us/library/ms170363%28v=sql.90%29.aspx

    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: List of when commands were introduced

    This can help you for SQL Server 2012, 2008 & 2008R2. I'm not sure if there's a list for 2005 somewhere in the web (there used to be).

    http://msdn.microsoft.com/en-us/library/bb500435.aspx

    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: CALCULATE 2 years back data

    Using DATEADD

    SELECT DATEADD(YEAR, -2, GETDATE()), CAST( DATEADD(YEAR, -2, GETDATE()) AS DATE)

    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: Not asking for any parameters in stored procedure

    The problem is that you don't have any parameters declared. All you have are variables.

    Without knowing more about your SP, this might help but you might want to remove parameters...

    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

    I just tried it and it worked fine.

    I can't replicate your error either for a missing linked server or a misdirection for the database. Maybe someone else can help...

    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: Not asking for any parameters in stored procedure

    Could you post the complete definition of the stored procedure?

    try to use the IFCode located in the left when you write the post [ code="sql"][/code]

    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: Parsing Last,First Middle Name

    If you ever cross with a spanish last name with spaces, you might have problems with the 8K splitter.

    This formula might have its own problems, but it's another option for...

    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: Not asking for any parameters in stored procedure

    That's not the code for a Stored Procedure. If you have defaults assigned to the parameters, then the SP won't forrce you to input any parameter.

    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,906 through 7,920 (of 8,731 total)