Forum Replies Created

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

  • RE: Most tricky

    I disagree.  I think David's solution works in all cases:

    create table

    ([value] varchar(100))

    insert into

    ([value])

                select 'Val1'

      union all select 'Val1'

      union...

  • RE: SQL join question

    Try:

    select A.LastName, A.FirstName, C.Description, E.OrgName

      from A

        inner join B on B.ContactID = A.ContactID

        inner join C on C.ContactTypeID = B.ContactTypeID

        inner join D on D.ContactID = A.ContactID

        inner join...

  • RE: SQL QUERY TO EXCEL FILE

    Have you tried embedding the SQL Query in the Excel spreadsheet? 

    Data -> Import External Data -> New Database Query. 

    You can use Query Manager to build the query if it...

  • RE: Change DEFAULT value for a column

    Oh!  Got it now.  Thanks, ramses2nd!  Syntax is:

    ALTER TABLE dbo.bat_Batches

     DROP CONSTRAINT DF_bat_Batches_Version;

    ALTER TABLE dbo.bat_Batches ADD...

  • RE: Change DEFAULT value for a column

    Can you be more specific?  I can't seem to find the right syntax.  Have tried things like:

    ALTER TABLE dbo.bat_Batches ALTER COLUMN

     Version int NOT NULL CONSTRAINT DF_bat_Batches_Version DEFAULT 2

    and

    ALTER...

  • RE: need quick easy answer

    Or better yet --

    If @ACCOUNTTIME is NULL

    @ACCOUNTTIME=0

  • RE: need quick easy answer

    If @ACCOUNTTIME==NULL

    @ACCOUNTTIME=0

  • RE: Sub query alternative

    select t1.Tab1ID

    from @Tab1 t1

    inner join @Tab2 t2 on t2.Tab1ID = t1.Tab1ID

  • RE: Linking SQL view as table in Access

    The easiest way I have found to do what I think you are trying to do is to change the underlying ODBC link name.

    I create two ODBC links....

  • RE: Select the last two previous dates from a Dates Table

    select max(Latest2.[Date]) as MostRecent

    ,min(Latest2.[Date]) as PriorDate

    from (select top 2 [Date] from Dates

    where [Date] <= @BusinessDate

    ...

  • RE: Phantom Index from ShowContig?

    Yes, it does. Hmmm. Pointer to data stored outside of table?

    Statistics would indicate that there is a lot of fragmentation from that index. Can I/Should...

  • RE: Outlook 2003 okay for SQL Mail?

    Ahh.  That's what I forgot, the custom install.  Thank you all for your advice. 

  • RE: Full text indexing with Windows Server 2003

      gerogedo -- Your suggestion in your 12/15 post corrected the problem that I was having. 

    Thank you very much.  I appreciate your help....

  • RE: How to convert vertical records to horizontal?

    If no scripting allowed, how about....

    select min(a.ProductID), min(b.ProductID), min(c.ProductID), min(d.ProductID)  
      from Table1 a
        left join Table1 b on b.ProductID > a.ProductID
        left join Table1 c on c.ProductID > b.ProductID
       ...
  • RE: Need your help!!!

    Simply add

    AND T.timeSlotID >= (select timeSlotID from tblTimeSlots where timeSlotTime = '10.00am') 
    AND T.timeSlotID < (select timeSlotID from tblTimeSlots where timeSlotTime = '2.00pm') 

    to the query that

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