Forum Replies Created

Viewing 15 posts - 3,091 through 3,105 (of 5,103 total)

  • RE: Splitting 1 column into 2 based on spaces

    OR

    declare @a varchar(120), @b-2 varchar(120)

    set @a = 'COMPUTER CORP                                    45474'

    set @b-2 = 'SQL IMAGING, INC     90159S'

    select left(@a, charindex('  ', @a)-2),  right(@a,  charindex('  ', reverse(@a))-2) -- two spaces

  • RE: Function "never" returns

    Well if that is to be used in a stored procedure. I would

    1.  Divide those "operations" in to separate stored procedures (the caller determines which to call
    2. Change many on those "IN"...
  • RE: recursion/heirachy for a menu in t-sql

    Adam,

    the subject of Hierarchies on SQL Server is very extensive. It can be handled in many different ways an it will kind of too long to describe here. On SQL...

  • RE: Function "never" returns

    >>The query returns 100k IDs when I run it.<<

    Well 100k down to the client sounds like a very bad idea. You may be running out of resources depending on the...

  • RE: ntext in storedprocedure

    If you need that many characters I think it will be a lot Better to generate a template file and handle that outside of TSQL. ntext ,or  any BLOB type for...

  • RE: INDEX CONFUSION

    and indid = 0 just indicates is the heap which last page is located in the root field

     

  • RE: How do I do this in SQL Server please........

    you have now become the official "knight in shining armour" of this site...

    I don't mind telling the truth to anyone that deserve it but...

  • RE: AlphaNumeric code generator

    Ah !!! that may be the case ( I am not good at guessing )

    Well without more info on how the generation is...

  • RE: date check before insert

    as long as all your DML (data modifications) go through stored procedures it is safer to to write something like this:

    create proc ins_schedule (@schedID int output, @classID int, @branchID int,...

  • RE: @tablename vs #tablename

    well, black eye ... sounds too painful

    and if I have to guess I would say is the SAME person

  • RE: Quotes, Apostrophes, and strings

    Happy to Help

     

  • RE: Execution plan for Stored procedure

    The effect is called Parameter sniffing

    you may have had the same effect adding with recomplie at the procedure declaration

    This happens a lot...

  • RE: creating default value

    OOPS!!     I didn't read the UPdate part!!!

    If you need to "update" that value then there is no...

  • RE: creating default value

    OR use a calculated column:

     

     

     

    create table tt

    (id int identity(1,1) Primary Key,

    columnX as  'abc' + cast(id as varchar(180))

    )

    insert into tt default values

    insert into tt default values

    insert into tt default values

    insert...

  • RE: Quotes, Apostrophes, and strings

    the double quotes are used also in place of identifyers like [] if you have a column with an special caracter in it or is a reserved word you use...

Viewing 15 posts - 3,091 through 3,105 (of 5,103 total)