Forum Replies Created

Viewing 15 posts - 151 through 165 (of 359 total)

  • RE: Create paramater and pass it into SQL query

    is the data always the same? or will it always follow this format ###-###-##### ##### ie eoc-ABC-Adult 2011

    If not then perhaps something like this would be better to start your...

  • RE: IF statement / Variables.. problems!

    can you past in some DDL and representative data so that we can see what your trying to explain?

  • RE: retrieve newly added record

    are you saying that every time a row gets inserted into a specific table then insert the value into another table? if so then look up triggers

  • RE: How to find missing number ??

    thsi will help you identify where the gaps are

    ;with seqcheck

    as

    (

    select row_number() over(partition by id order by id ) as rn, id,bid from qa_test

    )

    select b.bid,a.bid

    from seqcheck a inner join...

  • RE: How to find missing number ??

    well from your description and the data added then there are no missing BID

    id 123 has count of 4 and there are 4 rows,

    id 124 has a count of 3...

  • RE: Filtering data from a table

    have a look at this

    create table #t1 (id int, status varchar(10), tme time)

    insert into #t1 select 1,'started','07:00' union all

    select 1,'running','08:00' union all

    select 1,'completed','09:00' union all

    select 2,'started','10:00' union all

    select 2,'running','11:00'

    ;with cts

    as...

  • RE: If Having More Than x Then Where Statement

    Nope, look up dynamic SQL, if you provide some DDL i can help you with some dynamic SQL to complete your task

  • RE: Better Bosses Needed

    From reading all the comments about bad bosses perhaps to move up the ladder we need to become rudish at what we do. well, thats decided, im going to be...

  • RE: Better Bosses Needed

    Having managed teams of variouse types for over 10 years I feel that to be a manager you but need to follow a few simple rules.

    Never expect anyone do do...

  • RE: Computed columns: max from other column for the same ID

    run your select into a CTE then get the min max from there

    eg.

    ;with cte

    as

    (

    select id, (col1+col2)/2 as whatever

    from table where x y z

    )

    select id, min (whatever), max (whatever)

    from cte

    group...

  • RE: Conditional split Expression help

    i had not noticed this was for SSIS :w00t:

  • RE: Conditional split Expression help

    excuse double post i replied to the other post before seeing the link

    you could achieve your reslutls by using patindex

    PATINDEX('%[0-9]%',col1)=0

    if there is a value between 0 and 9 in col1...

  • RE: Need help with conditional split

    you could use patindex to filter out if a column has a numerical value in it then dont return like so

    where PATINDEX('%[0-9]%',col1)=0

  • RE: INSERT AND UPDATE WITH IF EXISTS

    I think that it would be best if you provided some DDL and a description of your task, we can then look and assist you 🙂 😉

  • RE: Multiple Top 25's

    bring results into a CTE, then use row_number() with over(partition) by the store to set a row number for each store then select your collums from cte where your row_number...

Viewing 15 posts - 151 through 165 (of 359 total)