Forum Replies Created

Viewing 15 posts - 5,716 through 5,730 (of 7,619 total)

  • RE: How to check latest SP is on server

    You could even DROP and (re)CREATE the procedure as long as you re-added the extended procedure with the version number after the CREATE.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: How to check latest SP is on server

    Staggerlee (10/14/2014)

    Is there a way via T-SQL to check or read information from a stored procedure? Ie, could I add a comment with a build number in it?

    I suggest...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: check varchar column for values that are only numeric - HOW

    I suggest a different method to avoid 2 or more decimal points:

    AND CASE

    ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: extract number from string

    Jeff Moden (10/14/2014)


    It'll be interesting when an actual vendor name also contains dashes. 😛

    In that case, presumably we would search first for a digit only, "%0-9%", then do the search...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: extract number from string

    SELECT Fulltext, Contract2,

    Substring(Contract2, Contract3_Start, Contract3_Length) AS Contract3

    FROM (

    SELECT Fulltext From [Sonae].[dbo].[Images_Local]

    ) AS test_data

    cross apply (

    SELECT Substring(FullText, PATINDEX('%Contrato%',FullText), 50) as Contract2

    ) as...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: extract number from string

    SELECT Fulltext, Contract2,

    Substring(Contract2, Contract3_Start, Contract3_Length) AS Contract3

    FROM (

    SELECT 'Contrato Promocional 2010-241772 Descrico CDR TD' AS Fulltext UNION ALL

    ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need Help with Stored Procedure

    CELKO (10/10/2014)


    Identity is as good, convenient, practical way of assigning something like a sequential Order#.

    No it is not; we have the ANSI/ISO Standard CREATE SEQUENCE now....

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need Help with Stored Procedure

    CELKO (10/10/2014)

    Again, who the hell has used tape for anything but backups in 20 years?! At least join the 1990s if you can't all the way to 2014!

    ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need Help with Stored Procedure

    CELKO (10/10/2014)

    Finally, we use lowercase for data types, because in SQL Server type names are case sensitive in many contexts. We do not want to cause unexpected future errors...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need Help with Stored Procedure

    CELKO (10/9/2014)

    A competent professional in any trade would do it right without any special effort. Does a doctor think about stitches, or does he just do them? He would also...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need Help with Stored Procedure

    CELKO (10/9/2014)

    1. You have many ISO-11179 violations. Do you have only one Employee, as you said? The correct name is “Personnel”; an abstract set of elements.

    2. A procedure is...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: tempdb log 75GB

    lawson2305 (10/9/2014)

    Scott I wanted to add what does multiple data files provide? Is there a read on this somewhere?

    Yes, plenty of people have investigated and written on this. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: tempdb log 75GB

    lawson2305 (10/8/2014)


    ok found the offending EXE causing this issue but I have some questions on the tempdb. This will have to be looked at why this is happening by...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Identity and Scope_Identity with triggers

    joepacelli (10/8/2014)


    The outputrowcount is fine. It returns 1

    it's my identity column which is returning 0

    I also tried Ident_current('dbo.jobid')

    This returns the correct value

    But, according to MSDN site

    Be cautious about using IDENT_CURRENT...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need Help with Stored Procedure

    Luis Cazares (10/8/2014)


    ScottPletcher (10/8/2014)


    Hmm, seems to be that code would list the same customer, the "first" one, over and over rather than listing every individual customer in the state. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 5,716 through 5,730 (of 7,619 total)