Forum Replies Created

Viewing 15 posts - 226 through 240 (of 267 total)

  • RE: HELP: Dropping a column damages a stored procedure

    One way is to search through SYSCOMMENTS lookging for the table name and the column nae:

    declare @table_name varchar(32), @column_name varchar(32)

    select a.name

    from sysobjects a, syscomments b

    ...

  • RE: Table creation

    If this is a one off:

    - in Enterprise Manager, select table

    - right mouse click the table and select Generate SQL Scripts

    - in Options tab, check the Table Scripting Options check...

  • RE: Outputing records together, from multiple tables

    Rather than using a join, try a UNION:

    select <column_name> as output_column

    from table 1

    where remark = 1

    and date >= @datevalue

    union

    select <column_name> as output column

    from table 2

    where remark = 2

    ...

  • RE: Help: How to add messages to Job History sql2000

    This is the script of a job which shows print statements at work:

    BEGIN TRANSACTION

    DECLARE @JobID BINARY(16)...

  • RE: Help: How to add messages to Job History sql2000

    In the job history, tick the box in the top right 'Show step details'. The print statements and in the detail for each step in the job.

    Jeremy

  • RE: Help: How to add messages to Job History sql2000

    I do this with a print statement in a stored procedure.

    Jeremy

  • RE: Stripping a string

    Another thought, if you know that there are always 2 digits, you could use the RIGHT function:

    select right('souph-0-97',2)

  • RE: Stripping a string

    Use the REVERSE function to turn the string around, then SUBSTRING based on the position of the now first hypen and REVERSE it back:

    select reverse(substring(reverse('souph-0-97'),1,charindex('-',reverse('souph-0-97'))-1))

    Jeremy

  • RE: Departmentalizing Databases

    Greg,

    It was 6 or 7 seven years ago, on a single IBM Mainframe using DB2 as the database. I was doing other work at the time and was not...

  • RE: deleting large amout of data

    I regulary truncate a 10 million row table with no problems - takes a couple of seconds.

    Deleting rows with a delete statement is a logged transaction whereas truncate is non-logged....

  • RE: Return Control Before code is finished

    I do this extensively - I have a number of jobs that check a table for an entry once a second continuously against a table with 155k rows and the...

  • RE: Departmentalizing Databases

    At one site where I worked, they had a very strong view of how we should develop systems.

    What they did was to identify data as either being corporate...

  • RE: Stored Procedure and ')' error

    I have done a fair amount of ASP work calling SQL Server stored procedures (which I admit is not the same as ColdFusion) and in these situations I would try...

  • RE: No job history but job ran

    Bill,

    You might want to check the size of the job history log and the max history per job.

    If you right click on SQL Server Agent (in Enterprise Manager) and Properties...

  • RE: Clear Errors

    My VB isn't great but if you use OnError to trap the error, you can then include some specific error handling in VB to check for errors (Err.Number). You'll...

Viewing 15 posts - 226 through 240 (of 267 total)