Forum Replies Created

Viewing 15 posts - 106 through 120 (of 498 total)

  • RE: Need Help with String Functions

    Well since you have the first part... Here is the whole thing

    IF EXISTS(SELECT * FROM tempdb..sysobjects WHERE id = object_id('tempdb..#Testit'))

        DROP TABLE #Testit

    CREATE...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: cross tab query.

    Could you add a codetype table so that you can join to it to make the cross tab easier?  If you logically group the codes in CodeMaster into a codetype then...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Row lookup problem

    I would guess that it is due to @@servername probably being declared as sysname (I think that relates to nvarchar(128)) behind the scenes and your field is declared as a varchar(20)....




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Insert Trigger

    BTW: Steve has a typo in his otherwise great code. It should be "inserted" rather than "inserter"




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Expression Interpretation

    As you stated Parsing is the hard part. Basically I would create a UDF to parse out each command and return them as a table. Then work from the inner most...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: LIKE % not returning results properly

    Can you post some sql that reproduces this? Maybe then we can figure out what is happening. I've never had a problem using the % wildcard with a like statement....




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Nested select statements / running total

    I agree with Antarres. We don't have enough information to give you any meaningful help. The syntx of the query above is completely out of whack.

    After looking at this...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Help needed with query/sp

    Hmmm... Well here is a quick sample SP I just wrote that should help you with the variable usage.

     

    USE pubs

    GO

    -- First check to see if the sproc exists and if...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Help needed with query/sp

    Also note that since you don't have the ability to directly use the form from SQL Server you would probably want to make the form field data into a parameter...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: T-SQL and Microsoft Query

    Can you turn your query into a view and then have your query in MSQuery do the date filtering against the view?




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Conditional OUTER JOIN

    Your psuedo code above is slightly flawed. By putting the restriction in a where clause rather than the join you are in effect turning the query into an inner join....




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Jobs still run, even when DISABLED

    Mark,

    That is why I wanted to know what the job history stated. At least then you would know where to look. Once you know what is starting the job then...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: self updated in field in same table

    That was my first thought and then I went and did it the hard way! Go figure! Sigh...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: self updated in field in same table

    Umm... How about

    Update t

    SET ORG = t2.ORG

    FROM tbl t

        JOIN (SELECT DISTINCT ContDir, ORG FROM tbl WHERE ORG IS NOT NULL) t2

            ON t.ContDir = t2.ContDir




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

  • RE: Challenging one!!! need real stud

    I tried this many different ways and the only way I could get the results you were looking for is to use a correlated subquery with a self join.

    use...




    Gary Johnson
    Microsoft Natural Language Group
    DBA, Sr. DB Engineer

    This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.

Viewing 15 posts - 106 through 120 (of 498 total)