Forum Replies Created

Viewing 15 posts - 16 through 30 (of 113 total)

  • RE: CTE DML

    I never even considered using a CTE for an insert..... interesting.

  • RE: RAISERROR Nulls?

    So just to clarify - the insert into the audit table is perfect. It has the correct information. The raiserror has the nulls.

  • RE: RAISERROR Nulls?

    CREATE TABLE [dbo].[Audit_Errors](

    [AuditLogErrorsID] [int] IDENTITY(1,1) NOT NULL,

    [ErrorTime] [datetime] NULL,

    [JobID] [int] NULL,

    [JobStepID] [int] NULL,

    [StepDescription] [varchar](250) NULL,

    [ErrorNumber] [int] NULL,

    [ErrorSeverity] [int] NULL,

    [ErrorState] [int] NULL,

    [ErrorProcedure] [nvarchar](200) NULL,

    [ErrorLine] [int] NULL,

    [ErrorMessage] [nvarchar](4000) NULL,

    CONSTRAINT [PK_Audit_Errors] PRIMARY...

  • RE: RAISERROR Nulls?

    Hi,

    Sorry i am a little confused. What primary key? The table insert is fine.... its the raiserror that is showing nulls.

    Sorry if i was unclear.

    Dan

  • RE: Error Handling - String or binary data would be truncated

    Eirikur Eiriksson (5/16/2014)


    Is there any error handling in SP_LogProc?

    😎

    Nope :crazy:

    Thanks anyway.

  • RE: Error Handling - String or binary data would be truncated

    Amongst quite a few other additions that will be the plan.

    What I am trying to understand is why what has happened, happened? It just seems a little odd...

  • RE: msdb.dbo.sysjobhistory Linking

    Yes, but that just gives you details of the jobs and the steps the job should take. How to then make it know that 5 steps that were run...

  • RE: Cursor from variable

    Hi,

    To answer your question - the tables will all be identical, just with different procedures within.

    I have done dynamic SQL before with sp_executesql however i cant work out the way...

  • RE: SQL Server port

    Stuart Davies (4/25/2014)


    Koen Verbeeck (4/25/2014)


    3% reckon it can't be changed - worrying

    Not really. As there are people who frequent this site who are not a DBA and never...

  • RE: Default schema

    mkeustermans (4/1/2014)


    Since king_login has default schema of king_schema and has been assigend the db_owner role and no other, the table will be created as king_schema.wonders.

    Points back please.

    I think...

  • RE: Default schema

    Maybe the answer is nothing happens because the server isnt a server, but is infact a piece of cheese.

    Very strange answer....

  • RE: What is (Null='Hello') in Sql Server

    Am I the only one who thinks that is the expected behaviour?

    With default SQL settings...

    You cant ask if something = null and expect to get the correct answer. So...

  • RE: Error converting data type nvarchar to numeric.

    Hi,

    Thanks for the message. I did understand Gail - perhaps my response wasnt clear. Yes other entries may have non numericals.

    That is why i tried putting a case...

  • RE: Error converting data type nvarchar to numeric.

    Hi Gail,

    There will be non numerics (i have simplified the query a little).

    I have tried this:

    select

    a.Id,

    cast(

    CASE WHEN A.Team = 'Team1' then

    isnull(B.answer,0) else 0 end as numeric(32,2))

    from

    tableA A

    INNER JOIN

    TableB...

  • RE: Error converting data type nvarchar to numeric.

    GilaMonster (2/28/2014)


    Are there any answers for teams other than Team1 which have non-numeric values? If so, that's probably the cause. The case could be occuring on rows which would later...

Viewing 15 posts - 16 through 30 (of 113 total)