Forum Replies Created

Viewing 15 posts - 1,621 through 1,635 (of 3,543 total)

  • RE: Trigger help

    Looks like direct recursion and you have the RECURSIVE_TRIGGERS option set

    As you stated, use 'IF UPDATE ()' to control the update in the trigger

    or use TRIGGER_NESTLEVEL

  • RE: select query

    SELECT x.EMPID,COALESCE(a.[NAME],'') AS [NAME],COALESCE(l.LICENSE,'') AS [LICENSE]

    FROM (SELECT N'111111' AS [EMPID]) x

    LEFT JOIN @HREMP_adp a ON a.EMPID = x.EMPID

    LEFT JOIN @License l ON l.EMPID = x.EMPID

  • RE: Need To Use joins in accompalishing this.

    Other than trying Sergiy's approach. If the dataset is large then performance will always be an issue whatever solution you try.

    To avoid the use of a function you could try...

  • RE: Where is the one place that you should definitely NOT ...

    wow Jeff you sure ask the toughies

    Wish I knew the answer

  • RE: Forum Date Format

    quoteOnly the International (yyyy-mm-dd) is self-describing and explicit

    Only if you know the displayed value is in that format

    What...

  • RE: Question of the Day for 23 Mar 2007

    Bad question

    'Default Instance' has a default port, 'Named Instances' do not

    The question should have specified 'Default...

  • RE: How do I reference data without an alias?

    Firstly, views cannot have duplicate column names therefore if you have duplicate names then they are from your own query not the view, so use the alias in your query...

  • RE: Converting 1 Address line to two without messing up address line

    Based on the data supplied

    Field1

    LEFT([Address],LEN([Address])-CHARINDEX(' ',REVERSE([Address]),CHARINDEX(' .',REVERSE([Address]))+1))

    Field2

    SUBSTRING([Address],LEN([Address])-CHARINDEX(' ',REVERSE([Address]),CHARINDEX(' .',REVERSE([Address]))+1)+2,255)

    If the data varies from the supplied standard or there are trailing spaces then the above will not work without adding RTRIM...

  • RE: Split string in sql server 2000

    Just thought

    Do you want to extract or remove the img tag

  • RE: Split string in sql server 2000

    quoteSince your input is a xml document check out sp_xml_preparedocument

    The HTML given is not XML compliant

    One way to...

  • RE: auto run store procedure

    Look up in BOL (Books Online)

    How to create a job (Enterprise Manager)

    Creating Job Steps (specifically Transact-SQL Job Steps as you will want to EXEC your proc)

    How to schedule a job...

  • RE: Most tricky

    better solution (one less join )

    SELECT a.[value],n.number

    FROM (SELECT [value],COUNT(*) AS [Num] FROM GROUP...

  • RE: Most tricky

    Do you mean like this

    SELECT a.[value],n.number

    FROM a

    INNER JOIN (SELECT [value],COUNT(*) AS [Num]

    FROM GROUP BY [value]) s

    ON s.[value] = a.[value]

    INNER JOIN master.dbo.spt_values n ON...

  • RE: How to rid of duplicate row headers

    Providing that Subjects in ASC order for [Name] does not matter then

    SELECT

    CASE WHEN a.Subjects1 = b.Subjects2 THEN a.Name1 ELSE a.Subjects1 END AS [Name],

    CASE WHEN a.Subjects1 = b.Subjects2 THEN a.Subjects1...

  • RE: Elegant solution to query of DATETIME data?

    p.s.

    SELECT @result = COUNT(*)

    FROM (SELECT c.[Date]

    FROM @MyTable a

    INNER JOIN [Calendar] c

    ON c.[Date] >= a.StartDate AND c.[Date] <= a.EndDate

    GROUP BY c.[Date]

    HAVING COUNT(*) = 1) x...

Viewing 15 posts - 1,621 through 1,635 (of 3,543 total)