Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)

  • RE: JOIN Problem

    How do you want the records returned?

    Is it for a report output, therefore would just blanking out the repeated lines be acceptable, ie:

    ID....detail

    1.....Ball

    ......Bat

    ......Club

    2.....Swing

    ......Slide

    etc...

    If not, in what manner do you want...

  • RE: Copy data from 1 db to another

    Probably several options to do this.

    One would be to set up the two servers as linked Servers.

    This can be fairly easily through Enterprise manager: Security, Linked Servers (see Books on...

  • RE: date function

    If you want to group by quarter, and year:

    select

    datepart(Q,Date),

    datepart(yy,Date),

    Count(*)

    from myTable

    group by datepart(Q,Date),datepart(yy,Date)

    else just quarter:

    select

    datepart(Q,Date),

    count(*)

    from myTable

    group by datepart(Q,Date)

    as mccork said: see BOL for Datepart

  • RE: REPLACE to get rid of unwanted characters

    How about simply:

    select IDColumn

    , DataValue

    from TableCheck

    where DataValue like '%,%,%'

  • RE: current row in a trigger

    In the trigger, pull out the Primary Key value from the trigger's 'Inserted' table.

    select (PrimaryKey field) from Inserted

    Or use the same statement to pull out the value of the column...

  • RE: Difficult query

    Ok, i think we're all up to speed now!

    As you cannot use the column name Example in the where clause, another other option is to reproduce the case statement in...

  • RE: Difficult query

    Yopu will need to change the last line to:

    and Type = 'Business'

  • RE: Difficult query

    Put the column name inside the case statment, then you can do something like this:

    SELECT CASE

    WHEN type = 'popular_comp' THEN 'Popular Computing'

    WHEN type = 'mod_cook' THEN...

  • RE: Function within a Function issue

    Thanks for the quick response and the suggestion. Using your suggestion has improved the method I was looking at, I can now still keep the function name in the tables,...

Viewing 9 posts - 1 through 9 (of 9 total)