Forum Replies Created

Viewing 15 posts - 14,926 through 14,940 (of 15,381 total)

  • RE: counter for insert

    That looks about right.

  • RE: counter for insert

    You had a valid insert above, just add the primarykey column that you are now adding and you should be good to go.

  • RE: Stored Procedure Help

    njdevils39 (3/8/2011)


    Basically I have to write a stored procedure using dynamic sql

    to

    update the slxhrscreentemplates table in version5_sales

    with the information from the

    slxhrscreentemplates in version500

    I have 4 parameters:

    1. source Database =...

  • RE: counter for insert

    Look at the example above, there is no subselect. Short of putting in your column names I coded it for you. 🙂

  • RE: counter for insert

    The Row_Number function creates a new column.

    select Row_Number() over(order by someColumn) as myRowCount

    , othercolumns here

    from mytable

  • RE: counter for insert

    take a look at the Row_Number function on bol. It will get you exactly what you need.

  • RE: need to change the table

    that will work fine as long as the column exists. I put the exists check in to make sure they exist per your requirements.

    ...need to delete the columns in the...

  • RE: need to change the table

    this should get you close. Just have to repeat each column you want to drop

    if exists(

    select * from syscolumns

    where id = OBJECT_ID('table name')

    and name = 'column name'

    )

    alter table [table...

  • RE: error when passing syntax in sql server 2000

    Please don't cross post. The original thread is here

  • RE: Web Sevice Documentation

    This is better. It will directly get you the datatype name.

    select t.name, sc.* from sysobjects so

    join syscolumns sc on sc.id = so.id

    join systypes t on t.xtype = sc.xtype

    where so.name =...

  • RE: Web Sevice Documentation

    Of course there really isn't a max length on System.String in .net. Well there is but it is totally huge. You are now trying to get the field size of...

  • RE: date format problem

    Sounds like regional settings but you said you double checked them.

    what is the result from:

    select CAST('2011-03-08 00:00:00' as datetime)

  • RE: Remove Spaces Between Columns In Results To Text

    That looks like the columns are fixed length. Try looking at rtrim function.

  • RE: Stored Procedure Help

    Keep in mind that we can't see your screen and we are not familiar with your project. I still have no idea what you are trying to do here.

    One quick...

  • RE: Stored Procedure Help

    What is the question here?

Viewing 15 posts - 14,926 through 14,940 (of 15,381 total)