Forum Replies Created

Viewing 15 posts - 21,496 through 21,510 (of 26,490 total)

  • RE: How to use an OUTPUT parameter and check if a record exists

    If you were to execute the procedure I posted above in SSMS, this is how you would do it:

    declare @id int,

    @uname varchar(50),

    ...

  • RE: How to use an OUTPUT parameter and check if a record exists

    This is how I would write the procedure:

    alter procedure [dbo].[checkComms]

    @CommID int,

    @username varchar(50),

    @status varchar(200) OUTPUT

    as

    begin

    ...

  • RE: Select query runs forever in sql 2005

    Can you tell me more about the configuration of the server all of this is running on?

  • RE: Select query runs forever in sql 2005

    Had an idea for SQL Server 2005. This WON"T work on SQL Server 2000. Please give it a try, and let's see what happens.

    select

    *

    from

    ...

  • RE: Select query runs forever in sql 2005

    While you are capturing the Execution Plan, could you post the complete query code you are running and the DDL (Including indexes) for the two tables.

    From what I can tell,...

  • RE: Select query runs forever in sql 2005

    I came up with another option, and I think it is easier. It uses patindex to find the first non-zero character.

    select substring(@varstr,patindex('%[^0]%', @varstr),len(@varstr) - patindex('%[^0]%', @varstr) + 1)

  • RE: T-SQL Operators

    I guess not enough people complained about the answer to this question.

  • RE: Performance issue with tally solution

    I have to agree with Jeff. This was an awesome thread and it demonstrates what a community can do when it works together for a common purpose. Hats...

  • RE: Select query runs forever in sql 2005

    See if you can use this code to strip leading zeros and if it helps your query.

    declare @varstr nvarchar(50);

    set @varstr = '000045691823';

    select substring(@varstr,patindex('%[A-Za-z1-9]%', @varstr),len(@varstr) - patindex('%[A-Za-z1-9]%', @varstr) + 1)

    set @varstr...

  • RE: Update query problem

    You should still be able to use the code sample above to develop a solution to your problem at work.

  • RE: Are the posted questions getting worse?

    Bruce W Cassidy (4/14/2009)


    [font="Verdana"]Didn't RBarryYoung's article start a little bun fight! It will be fun to watch. Brave, brave man.[/font]

    Looks like another "cursor man" out there if you...

  • RE: Update query problem

    May I suggest you read this article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

    Also you may want to read this blog: The Flip...

  • RE: Update query problem

    Does this help?

    create table dbo.xtable (

    ID int,

    val1 varchar(30) null,

    val2 varchar(30) null

    );

    create table #tmp (

    ID...

  • RE: Update query problem

    gbechar (4/14/2009)


    unfortunately I am writing from home and have no Internet at work.

    Yes , I need to update exsiting data

    Well, you need to provide a clearer picture of what you...

  • RE: Are the posted questions getting worse?

    GilaMonster (4/14/2009)


    Bruce W Cassidy (4/14/2009)


    [font="Verdana"]I took a lesson from St Lynn. Not sure it will help, but worth a shot.[/font]

    I'm not even sure what the question is any longer.

    Not...

Viewing 15 posts - 21,496 through 21,510 (of 26,490 total)