Forum Replies Created

Viewing 15 posts - 91 through 105 (of 119 total)

  • RE: Formatting Numerics to zero decimal precision

    Have you tried something like Convert(Int (#,0), FieldName) As ColumnName...

    Have you got any code for us to look at?

  • RE: Trigger With Error Handling Not Working

    Okay, some great tips there... I have modified the procedure as follows, taking out the error handling (in terms of checking the procedure itself), and really like the sound of...

  • RE: Trigger With Error Handling Not Working

    I'm not sure what you mean? The trigger works on every insert (the 3rd party tool can only insert 1 record at a time)...

  • RE: Error with Query (trying to concatenate two fields)

    I am yes, is it that obvious?

  • RE: Error with Query (trying to concatenate two fields)

    Ah Figured it!

    SELECTTempDB.CampaignName, TempDB.CRC, TempDB.Description, TempDB.Success, TempDB.Contact, TempDB.FinalCRC As Complete, TempDB.Recall,

    TempDB.RecallTime, CASE WHEN TempDB.Recall = '0' THEN '' ELSE TempDB.RecallTime + ' ' + TempDB.CBInfo END As CBInfo

    FROM

    (

    SELECT ...

  • RE: **Help Needed ** SUMMING HH:MM:SS Issues in SQL Reporting

    I have found the folloowing which is almost what I want, its a function created by anothe rmember to return days, hours, minutes and seconds in a 3:6:35:31 (d:H:MM:SS) format,...

  • RE: Absolute Values In Decimals

    Int

    Full layout of History table below;

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

    [SystemID] [tinyint] NOT NULL CONSTRAINT [DF__History__SystemI__17036CC0] DEFAULT ((0)),

    [ProjectID] [int] NOT NULL,

    [ProjName] [varchar](35) NOT NULL,

    [SourceTable] [varchar](32) NOT NULL,

    [SourceField] [varchar](32) NOT NULL,

    [SourceID]...

  • RE: Errors with Select query

    My dates & times are coming from a History table. This table contains a Key on HistoryID, and has the date and time in a DD/MM/YYYY HH:MM:SS:MMM format.

    [HistoryID] [int] IDENTITY(1,1)...

  • RE: Errors with Select query

    That worked great... Never used or heard of NULLIF... Full working code is;

    DECLARE @Date as varchar(10)

    SET @Date = '14/05/2008'

    SELECT@Date As Date, Agent.Firstname + ' ' + Agent.Lastname AS AgentName, Groups.GroupName...

  • RE: Errors with Select query

    Okay, I ran a query to check this theory using the following;

    Select *

    From History

    Where (CONVERT(Varchar, History.CallDateTime, 103) = '14/05/2008') AND(TalkTime = 0) AND (HoldTime = 0) AND (WrapTime = 0)...

  • RE: Errors with Select query

    Still add it... So 65 + 10 + 0 + 10 = 85

    But surely you can still sum a zero....?

  • RE: SQL server 2005

    Did you install the "entire feature onto the local drive" for the main sql componants?

    Also are you saying you can't see "Microsoft SQL Server Management Studio"? which is the...

  • RE: Help With A String Field

    Thank worked a Treat! Thank you! The code is as below;

    SELECT ISNULL(LEFT(Q5, ISNULL(NULLIF(CHARINDEX('-', Q5, 0) -1, -1),LEN(Q5))),'0845')

    FROM cmp_OrangeBroadband

    WHERE LastCRC = 'Sale'

    😀

  • RE: Help With A String Field

    Ah, but I still need the Nulls to be displayed, so if Q5 has 020-London, then I need 020 showing, If 0845-General, then 0845 needs to be displayed, and likewise...

  • RE: Help With A String Field

    Yep, worked fine! Code Below... Why is this then, why was this code needed on the where clause...? :ermm:

    SELECT ISNULL(LEFT(Q5,CHARINDEX('-',Q5)- 1),'') As Test

    FROM cmp_OrangeBroadband

    WHERE LastCRC = 'Sale' and CHARINDEX('-',Q5) >...

Viewing 15 posts - 91 through 105 (of 119 total)