Forum Replies Created

Viewing 15 posts - 8,476 through 8,490 (of 8,731 total)

  • RE: How to find a Query in all stored procedure

    Alexander Suprun (9/5/2012)


    Luis Cazares (9/5/2012)


    Bill Talada (9/5/2012)


    Searching the database for a query?? You mean not everyone uses VSS or TFS or other repository?

    Was that sarcasm? I really hope so,...

    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 find a Query in all stored procedure

    Bill Talada (9/5/2012)


    Searching the database for a query?? You mean not everyone uses VSS or TFS or other repository?

    Was that sarcasm? I really hope so, otherwise you might not...

    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 find a Query in all stored procedure

    I understand what you did Alan, but I believe that the problem is on the definition column, not the string used.

    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: Help with IF EXISTS and non existent column.

    Are you doing that in a Stored Procedure? It might not work since it will verify that all the code is correct to compile it. I might be wrong, but...

    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 find a Query in all stored procedure

    Have you tried to use a method to eliminate duplicate spaces?

    Here's one way to do it http://www.sqlservercentral.com/Forums/FindPost821209.aspx

    You might need to replace char(9), char(10) and char(13) as well.

    Basically something...

    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: This Year last 2 months query

    For what I understood

    SELECT ...

    WHERE Docket_Date >= DATEADD( mm, DATEDIFF( MM, 0, GETDATE()) - 2, 0) --Last two months

    AND Docket_Date >= DATEADD( yyyy, DATEDIFF( yyyy, 0, GETDATE()), 0) -- This...

    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: string manipulation - Need help !

    It might not be the optimal way, but it's simple enough for everyone to understand. However, I haven't tested for performance against other methods.

    DECLARE @test-2Table(

    MyStringvarchar(MAX))

    INSERT @test-2 VALUES

    ('NT AUTHORITY\SYSTEM: [System...

    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: string manipulation - Need help !

    Can you explain more your requirements?

    Because I'm sure that this won't work for you.

    SELECT inputString, SUBSTRING( inputString, 1,42) + SUBSTRING( inputString, 105,16)

    FROM (SELECT 'BUILTIN\ADMINISTRATORS: [System Admin]YES;[Security Admin];[Server Admin];[setup Admin];[Process Admin];[Disk...

    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: max(date colum) help

    A small change in the query:

    select

    program,

    Completed_task,

    timestamp

    from

    WorkQueue

    where type IN ('Software', 'Hardware', 'Software/Hardware')

    and status = 'Active'

    and...

    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: max(date colum) help

    Are you serious?

    having max(timestamp) >= max(timestamp)

    That's like using 1=1

    What you're trying to do should be something like this (I like to use variables but there are ways to do...

    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: max(date colum) help

    My guess is that you're missing this:

    HAVING max(timestamp) >= '20120829'

    AND max(timestamp) < '20120830'

    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: [Err] 22003 - [SQL Server] Arithmetic overflow error converting numeric to data type numeric.

    It's explained in this article: http://msdn.microsoft.com/en-us/library/ms187746(v=SQL.105).aspx

    However, let me try to explain it, but read the article as well.

    You had a decimal(10,2) value which can contain any value with two decimals...

    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: time to ms

    Just to give a different answer, but I'd stay with Lynn's function, as it's easier to read/write.

    DECLARE @test-2 TABLE( Mytime time)

    INSERT INTO @test-2 VALUES ('0:12:14:124'),('0:08:16:361'),('0:08:57:705')

    SELECT (DATEPART( HH, Mytime) * 3600000)...

    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: time to ms

    Try DATEPART(ms, YourTimeValue)

    Sorry, I need more coffee, I'll come back.

    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: [Err] 22003 - [SQL Server] Arithmetic overflow error converting numeric to data type numeric.

    cms9651 (9/4/2012)


    Luis Cazares (9/4/2012)


    Have you tried using DECIMAL(12,4)?

    thank you for help now working !!!!

    Do you know why did it worked? It's important for you to understand what happened there.

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