Forum Replies Created

Viewing 15 posts - 4,336 through 4,350 (of 5,103 total)

  • RE: using variables as tablenames?

    Ganesh,

    In your case it sounds like a separate sp for each case and one wrapper sp would do the trick. On the Wrapper one make sure to put them in...

  • RE: ADO can get a recordset from a Stored Procedure, Can TSQL?

    Several things to point out here:

    1. if you don't want to modify your sp then use this syntax:

    create table #T(ident int)

    insert into #T(isent) exec usp_CopyJob(10)

    select int from #T

     

    2.The proper way...

  • RE: Problem with a distributed query

    Change this:

    INSERT NETROSP005.ALERTASSMS.DBO.POLIFONICAS

    SELECT * FROM #TEMP_POLIFONICAS

    to:

    INSERT NETROSP005.ALERTASSMS.DBO.POLIFONICAS (fld1,fld2,fld3...)

    SELECT fld1,fld2,fld3... FROM #TEMP_POLIFONICAS

     

    It is not a good idea to leave field ordering to take place implicitly because you may not get what...

  • RE: using variables as tablenames?

    Joe,

    Have you ever made a mistake? and if you have... have someone offended you because od that ?

    IMO there is a difference between correcting peoples mistakes and OFFENDING them

     

  • RE: To bind or not to bind a default to a column

    You don't need sp_bindefault to generate Default Constraints with a Human Readable  Name FROM BOL:

    ALTER TABLE MyTable

    ADD AddDate smalldatetime NULL

    CONSTRAINT AddDateDflt

    DEFAULT getdate() WITH VALUES

    You Can also separate the process...

  • RE: using variables as tablenames?

    ... they came to this forum to get some help, not get bashed.

    I think so too!

  • RE: table returning udf join

    This is a common misunderstanding of the Table valued Functions.

    Supose your function returns Different result sets for different arguments HOW is the JOIN you are trying to accomplish going to...

  • RE: Adress interval into multiple records

    Assuming you have a "Numbers" table with values (0,1,2,.......)

    You can do it like this:

    insert into tNewTableName (ID, roadname, house_number)

    select ID, roadname, house_number_start + n.Numb

    from curHouses h join Numbers n on ...

  • RE: What toys (SAN) do I buy?

    ok - Seems like Dell it is. They have a nice bundle for £10k. Which includes 5 disks (Up to 14), extra HBA, fibre switch etc.

     

    Just so you know DEll is...

  • RE: Validate whether or not a store procedure returned data?

    I don't have access to my SQL Machine know but have you tried

    Select * from OpenQuery(LocalServer,'sp_help_job @job_name = 'JOBNAME', @execution_status = 4')

    if @@rowcount > 0

     Print 'Yes!'

    else

     Print 'No'

     

  • RE: Restore Database to new SQL Server from backup

    and to add to Osoba you will need also ,REPLACE if the files exists

    RESTORE DATABASE MyNwind   FROM MyNwind_1   WITH NORECOVERY
    ,      ...
  • RE: using variables as tablenames?

    This is an example of Dynamic SQL

    ...

    Declare @stm varchar(2000)

    set @stm = 'Select @StartRows = count(*) from ' + @TableName +

     'Where DT >= ' + convert(varchar(20), @Start, 112&nbsp

  • RE: Index Views

    Contrary to the above I have been able to replace a lot of trigger based Sumarization with indexed views successfuly and the report performance, locks minimization  and  management were all...

  • RE: using variables as tablenames?

    you should really look at the DB Design you are implementing:

    For starters

    1. you could have only one table if they are all similar  

    2. If you cant change the Design of...

Viewing 15 posts - 4,336 through 4,350 (of 5,103 total)