Forum Replies Created

Viewing 15 posts - 256 through 270 (of 455 total)

  • RE: Database transfer

    Yes you can do a backup and restore to map the files to a location on your primary hard drive.

     

  • RE: Days and Hours

    DECLARE @Hours INT

    SET @Hours = 25

    SELECT CAST((@Hours/24) AS VARCHAR) + ' Day(s) ' + CAST ((@Hours % 24) AS VARCHAR) + ' Hour(s)' AS DateValue

     

  • RE: Reporting Service Timeout Issue.

    MyWebService ws = new MyWebService()

    ws.TimeOut = time in milli seconds (This value should be set to the approximate SP execution time)

    then invoke ws.MyReportFunction(params....)

    However you may want to work on optimizing...

  • RE: creating column name from a variable

    Is it because you don't appreciate using dynamic sql !!! Also I have a question with respect to using BEGIN and END in a SQL where there is no Transaction...

  • RE: Days and Hours

    The better way of handling this would be on the SQL, to retrieve the day and hours in the desired format.

     

  • RE: creating column name from a variable

    DECLARE @thisquarter VARCHAR(10)

    DECLARE @sql NVARCHAR(4000)

    SET @thisquarter = '2006SU'

    SET @sql = 'IF  NOT EXISTS (SELECT * FROM syscolumns  WHERE id=object_id(''mytable'') and name=''TOT_' + @thisquarter + ''')

    ALTER TABLE mytable

    ADD  TOT_' + @thisquarter ...

  • RE: disaster recovery

    The Microsoft documentation has lot of good information on the Disaster Recovery Methodologies and Backup and Restore Strategies.

     

  • RE: creating column name from a variable

    And it may be wise to use IF EXISTS or IF NOT EXISTS script to check if the column is already existing on the table just to avoid errors.

     

  • RE: creating column name from a variable

    DECLARE @thisquarter VARCHAR(10)

    DECLARE @sql NVARCHAR(4000)

    SET @thisquarter = '2006SU'

    SET @sql = 'alter table mytable add TOT_' + @thisquarter  + ' varchar(50) '

    EXEC(@SQL)

    Dynamic SQL is not recommended, but if you want to...

  • RE: Collapsing groups while toggling intteractive sort

    When you are using your interactive sort, the report is refreshed and default to Initial Toggle state, so you need to set the InitialToggleState property to Expanded.

     

  • RE: rsInternalError @category_name is invalid

    The hotfix should do it but I read from one of the forum that this should give you a solution, try this 

    At command-prompt on the reportserver type:

    C:\Program Files\Microsoft SQL Server\80\Tools\Binn>rsconfig...

  • RE: Parameter in Select Qry in Stored Procedure

    It should take same time, it would be more clear if you can post the exact the script or atleast something near to what your doing.

     

  • RE: trigger help needed

    As mentioned by Sergiy, there is nothing possible like a part commit and part rollback possible in triggers, once your insert fails, everything is rolledback. If you are using stored...

  • RE: select top 5 salaired employee

    Your solution makes sense and depending on the modelling of the database the best required solution can be put to use.

    Thx

  • RE: fin date month year diff

    You can wrap the code posted by David and create UDF and call it in your queries.

    CREATE FUNCTION dbo.CalDateDiff(@firstdate DATETIME, @seconddate DATETIME)

    RETURNS VARCHAR(100)

    AS

    BEGIN

    DECLARE @months int

    DECLARE @days INT

    DECLARE @DateDifference VARCHAR(50)

    SET...

Viewing 15 posts - 256 through 270 (of 455 total)