Forum Replies Created

Viewing 15 posts - 1 through 15 (of 126 total)

  • RE: replace() remove the last character of some values

    ScottPletcher (3/4/2015)


    LEFT(family, CHARINDEX('--', [family] + '--') - 2)

    Edit: Added the "- 2".

    when I add this, its removing the text before the [--].

  • RE: replace() remove the last character of some values

    Jeff Moden (3/4/2015)


    What's wrong with just doing a replacement?

    UPDATE tgt

    SET Family = REPLACE(Family,'--','')

    FROM dbo.yourtable

    WHERE Family LIKE '%--%'

    ;

    there are other apps...

  • RE: query question, possible subquery?

    I get:

    Query:

    SELECT Jobs.JobFamily, JobDescriptions.[description]

    FROM Jobs t1

    INNER JOIN JobDescriptions t2 ON

    t2.ParentRole = t1.JobFamily + '_' + t1.[description]

    Error

    Msg 4104,...

  • RE: query question, possible subquery?

    Luis Cazares (3/2/2015)


    SQL_NuB (3/2/2015)


    ScottPletcher (3/2/2015)


    You really should leave the columns separate in the other table as well, but here's how to do the join with the combined column:

    SELECT ...

    FROM table1...

  • RE: query question, possible subquery?

    ScottPletcher (3/2/2015)


    You really should leave the columns separate in the other table as well, but here's how to do the join with the combined column:

    SELECT ...

    FROM table1 t1

    INNER JOIN table2...

  • RE: Import of huge XML file

    since you can't open it, I would kick it back to the sender requesting them to separate the data some how so it can be more manageable to work with.

    As...

  • RE: Import of huge XML file

    Is there a way to break it up? If not maybe doing the import out of SQL, such as using a .NET app or something to do the import.

    that's...

  • RE: help with query - am I going down the right path on this

    Single fixed query can only select the same fixed number of columns.

    As you select all columns from both ends, so you will get all values.

    Nulls can be values...

  • RE: help with query - am I going down the right path on this

    the values that are different so for example

    if Active is true in DB2 and now coming in as FALSE in DB1, I need that.

    as for NULL values, I never...

  • RE: DataTransfer

    you can use SSIS to migrate your data from 1 db to another. You can create a DB with that tables you need, then create an SSIS package and point...

  • RE: compare data row by row

    i'm creating the query/process to do the data compare, I was wondering if this could be done using SSIS or do queries have to be written.

  • RE: rolling 12 months

    really?

    I have someone else looking at it.

    Anyway, salesman, FromMonth, FromYear, ToMonth, ToYear are variables that are passed into it so it returns data.

  • RE: rolling 12 months

    the function is a select statement that pulls from 2 tables, it should be a view, its just pulling back months, name, and sales figures.

    the select shown is pulling the...

  • RE: rolling 12 months

    i'm not able to post data. the query is present.

    if its easy to accomplish, how can I accomplish it?

  • RE: where clause not working for some values

    Andy Hyslop (9/14/2012)


    What is the data that is contained within the TimePeriod table in your WHERE clause?

    Huh? The data is the model and the timeFrame.

    the data is stored in the...

Viewing 15 posts - 1 through 15 (of 126 total)