Forum Replies Created

Viewing 15 posts - 526 through 540 (of 2,452 total)

  • RE: Need help to modify XML file using T-SQL

    something along the lines of

    edit your duplicate posts

    delete content and replace with something like this.....

    "duplicate thread please post all replies to <insert URL here>" where URL is the single...

  • RE: Need help to modify XML file using T-SQL

    no need to cross post...please select one thread and repoint all others to just the one.

    thanks

  • RE: SQL to convert DATE datatype

    john.p.lantz (7/8/2016)


    Is there a way to convert a column with a DATE datatype to look like the DATETIME format? The format of the HH.MM.SS.MMM would all be zeroes.

    Have you...

  • RE: Convert Date List to Date Range

    Zidar (7/8/2016)


    Obviously, we need more constraints. What we have so far is OK, but we need more. Time permitting, new post is coming this afternoon, if not, then on Monday...

  • RE: Date Range overlaps

    ChrisM@Work (7/7/2016)


    You might find this version a little easier to follow than the IBG original and it only reads the data once, so it's quite a bit quicker:

    edit...the original OP...

  • RE: Finding a substring and extracting a number associated with it

    The Dixie Flatline (7/6/2016)


    Already did that. The extraction query itself takes about 15 seconds on my box. Execution plan says 30% of that is just...

  • RE: Finding a substring and extracting a number associated with it

    The Dixie Flatline (7/6/2016)


    Yes. I'm not sure why it wasn't letting me post that.

    More importantly: Does it work for you?

    yeah.. I think it works...sorry but havent had time...

  • RE: Finding a substring and extracting a number associated with it

    The Dixie Flatline (7/6/2016)


    Hey JLS, I think I have a solution, but for some strange reason the website won't let me post or upload the code if I spell out...

  • RE: Finding a substring and extracting a number associated with it

    J Livingston SQL (7/5/2016)


    Hi Alan..have been following your recent scripts and am suitably impressed.

    its now

    bed o'clock here and busy tomorrow...but hoping I can work through and understand your...

  • RE: Date Range overlaps

    does this work for you?

    CREATE TABLE #testtable(

    ID INT NULL

    ,Code VARCHAR(6)...

  • RE: Date Range overlaps

    Nomvula (7/6/2016)


    there will always be a startdate.

    each code i.e jls will not have more than 1 null end date

    ok so you will need to exclude all 'jls' rows from the...

  • RE: Date Range overlaps

    Nomvula (7/6/2016)


    Hi J

    according to your sample data. the results I'm expecting is

    INSERT INTO #testtable(Code,Startdate,Enddate) VALUES ('jls','2016-01-01',NULL)

    this means the downtime is still open.

    so, are you ever going to have a...

  • RE: Currency COnversion

    does this help you get going?

    CREATE TABLE tab1(

    Product VARCHAR(1) NOT NULL

    ,Currency VARCHAR(3) NOT NULL

    ,Cost INTEGER ...

  • RE: Currency COnversion

    amanspschauhan (7/5/2016)


    I have tried this-

    select

    Table 1.Product,

    Table 1.Currency,

    Table 1.Cost,

    Case

    when Table 2.Currency in ('AUD','CAD','EUR','GBP','INR','PLN','USD')

    then (Table 1.Cost/Table 2.ConversionRate) End as Actual Cost

    From Table 1, Table 2

    but it is giving me 56 records...

  • RE: Currency COnversion

    what have you tried so far?

    hint> create a join between your tables based on "currency"

Viewing 15 posts - 526 through 540 (of 2,452 total)