Forum Replies Created

Viewing 15 posts - 361 through 375 (of 433 total)

  • RE: divide by zero, but no fields are zero

    how about nulls instead of 0 for value_b?

  • RE: Help - How to build this query

    what type of indexes do you have on your tables?  Is resnum/booknum indexed on all fo the tables?

  • RE: Splitting records > 30 mins.

    Drives you nuts when you have to pull teeth to help someone out doesn't it?

  • RE: finding distinct data between two tables

    select table1.* from table1 left join table2 on table1.pk = table2.pk where table2.pk is null

    pk is whatever field is common between the 2 tables

  • RE: noob - What''''s the easiet way to print a list of database tables and their fields.

    I'm sure James' way is much better but here is what you needed to fix your sql.

     

    DECLARE my_cursor INSENSITIVE CURSOR

    FOR SELECT NAME FROM SYSOBJECTS where TYPE = 'U' order by...

  • RE: Splitting records > 30 mins.

    For clarification when we moved from minutes to a decimal

    .3 = 18 minutes

    .5 = 30 minutes

    You may need to change the values if you are really looking for 30 minutes...

  • RE: Splitting records > 30 mins.

    Sorry Ninja I didn't know the question was directed to me.  The poster only asked for 2 records, one for .3 and below and one for the remaining time regardless...

  • RE: Converting 1 Address line to two without messing up address line

    I'm sure there is a cleaner way to do this but it works

    left side

    select left('4065B EAST BREWINGTON ROAD',25- charindex(' ',reverse(left('4065B EAST BREWINGTON ROAD',25))))

    right side

    select right('4065B EAST BREWINGTON ROAD',len('4065B EAST BREWINGTON...

  • RE: Splitting records > 30 mins.

    insert into [tableA] --assuming TableA is already created

    (EventIDCrt,EventIDAdd,Machn_DESC,TYPE,DURATION)

     

    (select EventIDCrt,EventIDAdd,Machn_DESC,TYPE,

    case when DURATION <= .3 then duration else .3 end as duration from sfdc

    union

    select EventIDCrt,EventIDAdd,Machn_DESC,TYPE,DURATION - .3 as duration from sfdc...

  • RE: FTP file to a server

    you can also ftp the file back from the remote server and compare it to the file you sent.

  • RE: Splitting records > 30 mins.

    Is this what you are looking for?

    select EventIDCrt,EventIDAdd,Machn_DESC, TYPE,

    case when DURATION <= .3 then duration else .3 end as duration from sfdc

    union

    select EventIDCrt,EventIDAdd,Machn_DESC, TYPE,DURATION - .3 as duration from sfdc where...

  • RE: Getting duplicates

    without having table layouts and sample data there isn't much we can do.  There does not seem to be a group by in the level 4 part of the procedure...

  • RE: Getting duplicates

    Can you provide the create script for the tables and some sample data?  There is a lot going on there and we will need that to test. Make sure to...

  • RE: Newbie needs some T-SQL help, please

    The dates will roll back properly because you are using date functions.

     

    you may also want to think about making the current date a parameter instead of getdate() so you...

  • RE: Help - How to build this query

    Is Resnum from Table1 and what you want is a sum of all the charges asscoiated with that reservation number?

     

    select b.resnum,

    (sum (hn.price) + sum(ev.price) + sum(ai.price)) as totalprice

    from booking...

Viewing 15 posts - 361 through 375 (of 433 total)