Forum Replies Created

Viewing 15 posts - 16 through 30 (of 52 total)

  • RE: Multiple conditions on a single column

    or

     select StudentId from @yorTable where StudentId in

     (select StudentId from @Yourtable where Subject='Science')

    and Subject = 'Math'

    also does the trick

     

    s

  • RE: plz help me

    Um, your solution returns two rows of one column.  I thought you wanted to get two columns on a single row. 

     

    S

  • RE: plz help me

    A very simple way of doing this would be to declare two variables @RegisteredDistributors and @RegisteredResellers

    Set the two variables to the counts and then select both back:

    set nocount on

    declare @RegisteredDistributors...

  • RE: Why isnt ISNULL working?

    That would not work in 2000 either - if there is no entry for TEST02 in the table then there will be no row returned - if there is a...

  • RE: Storing Long Text.................

    I really think you need to look in Books On Line it will give you a really good primer in using BLOBs

  • RE: Storing Long Text.................

    If you use a column type of text you can store up to 2gb of data.  There is good stuff in BOL on this.  Essentially your table stores a pointer...

  • RE: How does this work?

    I was surprised by that, but I think it is doing this:

    @recipients = ''

    @recipients = 'a@abc.com;'

    @recipients = 'a@abc.com;b@abc.com;'

    @recipients = 'a@abc.com;b@abc.com;.....zz@abc.com'

    so essentially it is looping through staff appending...

  • RE: inconsistent result sets

    Well, I tried that but this is part of the result set:

    trn_ext_bat_id trn_task_code

    -------- ------------- ------------------------

    NULL           OAEHSGCO      0x4F4145485347434F

    NULL           OAEHSGCO      0x4F4145485347434F

    NULL           OAEHSGCO      0x4F4145485347434F

    3939           OAEHSGCO      0x4F4145485347434F

    3939           OAEHSGCO      0x4F4145485347434F

    As you can see it make no...

  • RE: inconsistent result sets

    No, as far as I can tell there are 147k rows which have a trn_ext_bat_id value.  I have set rowcount 0.

    The result set itself is reasonable (i.e. I am asking it to count the...

  • RE: inconsistent result sets

    The are no stupid suggestions.  However, in this case I am sure that the data is static between queries.  I am struggling to understand how a row with data in...

  • RE: inconsistent result sets

    sorry, I cut and pasted from QA but tried to remove the table specific data.  The query itself is

    select trn_ext_bat_id,count(*)

    from o_transfer

    where trn_ext_bat_id  is null

    and substring(trn_task_code,4,2) = 'HS'

    group by trn_ext_bat_id

    S

  • RE: Database Mirroring - Witness

    I ust don't think it works 🙁

    We had got to the point where we were losing sight of what we were trying to do - principally trying to do an...

  • RE: TSQL to add an index

    In it's most basic format:

    create index MyNewIndex on MyTable(MyColumn)

    If you want it to be clustered:

    create clustered index MyClusteredIndex on MyTable(MyColumn)

    if you want it unique:

    create unique index MyUniqueIndex on MyTable(MyColumn)

    If you...

  • RE: Database Mirroring - Witness

    I've granted Connect permissions on the endpoint to the Array\Administrator and to the NT Authority\Annonymos Logon but this didn't work.

     

    Hmmm

     

     

    S

  • RE: Database Mirroring - Witness

    This is slowly but surely sapping me of the will to live.

    I am now getting an error message in the event log as follows:

    Database Mirroring login attempt by user 'NT...

Viewing 15 posts - 16 through 30 (of 52 total)