Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 3,543 total)

  • RE: Question of the Day for 12 May 2004

    But the table is flagged as a user table (whether by error, design or feature), therefore the correct answer is correct

    from a certain point of view

  • RE: Shortcuts? Tools? Running the same SQL on many dbs...

    Tom,

    You are using table instead of db

    Try this

    declare @sql as varchar(300)

    set @sql = '

      declare @intCount as int

      if exists (select name from ?.dbo.sysobjects where name = '+CHAR(39)+'users'+CHAR(39)+'...

  • RE: Insert Between Two Servers

    No, you can use the OLE DB driver to connect between servers, it connects the same way as an application would. Linked servers are only necessary for 4 part naming...

  • RE: Insert Between Two Servers

    You could use DTS to export from processing to production, or import to production from processing depending on which server you want to run the DTS.

  • RE: Remove a Email Address from a string

    REPLACE(

    SUBSTRING(LEFT(@stringvalue,

    CHARINDEX('Subject:',@stringvalue)-1),

    CHARINDEX('To:',@stringvalue)+4,LEN(@stringvalue)),

    CHAR(13)+CHAR(10),'')

  • RE: count(*) problem

    How about

    select P.vcFname, count(*) as x

    from tbl_Projects P

    inner join tbl_ProjectsResearchers PR

    on PR.fk_intprojectID = P.pk_intProjectID

    group by P.vcFname

  • RE: Shortcuts? Tools? Running the same SQL on many dbs...

    For me, for each of my procs, I create a txt file containing sql to drop the proc (if it exists), report the drop, create the proc and report the create.

    I...

  • RE: Query Problem

    or

    select a.docnum

    from F0413 a

    inner join F0911 b

    on b.docnum = a.docnum

    and b.doctype IN ('PK','PO')

    group by a.docnum

    having sum(case when b.doctype = 'PK' then 1 else 0...

  • RE: Selecting only rows with changed value

    No apology needed. 

    I liked your code, it is the way I like to do it, not sure why I did my differently other...

  • RE: Selecting only rows with changed value

    Jeff,

    Well done, I do not want to steal your thunder but I must take issue with your post.

    First, my query does return the first value (ID=1920). 

    Second, I extended the data...

  • RE: How do I make a case-sensitive query?

    SELECT l_use, COUNT(l_use) countlu FROM #t

    GROUP BY CAST(l_use as varbinary),l_use

  • RE: Selecting only rows with changed value

    This should work, but may be bad performance (depending on indexing) for a lot of rows

    select a.*

    from  a

    left outer join b

    on b.col1 = (select max(col1) as col1...

  • RE: Performing calculations

    I have been thinking about this and have not come up with a simple answer yet. I am still unsure of what you want. Your asp is showing the details already...

  • RE: Question of the Day for 12 Apr 2004

    Josh,

    Create a new thread with details of your procs / triggers and what you expect them to do. This QOD is contrived to produce the result. Without details of what...

  • RE: Performing calculations

    Few questions

    Do you want the sums (revenue, expenses etc) as well as calculated totals?

    Is there a fixed number (and name) of sums and totals?

    Do you want the results in rows or columns...

Viewing 15 posts - 2,656 through 2,670 (of 3,543 total)