Forum Replies Created

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

  • RE: how can I tell if a colomn exists or not?

    Didn't you mean

    IF NOT EXISTS(select * from information_schema.columns where tablename='programversion' and columnname=@col )

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

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

    wow Jeff you sure ask the toughies

    Wish I knew the answer

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Split string in sql server 2000

    Just thought

    Do you want to extract or remove the img tag

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Most tricky

    better solution (one less join )

    SELECT a.[value],n.number

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

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • 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...

    Far away is close at hand in the images of elsewhere.
    Anon.

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