Forum Replies Created

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

  • RE: How do I extract Column info for a particular column?

    Jeff Moden (6/25/2008)


    Studying the code for sp_help and sp_SpaceUsed will give you a wealth of knowledge about system "tables"... the code sucks (especially for sp_SpaceUsed) but where they get some...

  • RE: How do I extract Column info for a particular column?

    Jeff Moden (6/25/2008)


    No... I've verified that sp_help is bound to Alt-F1... it just doesn't work for me. I highlight the table name as you suggested and press Alt-F1... all...

  • RE: How do I extract Column info for a particular column?

    Jeff Moden (6/25/2008)


    I have the Developers Edition for 2005 which is supposedly the same as the Enterprise Edition... the Alt F1 trick doesn't work for me.

    SQL2000 Query analyser - works

    Microsoft...

  • RE: How do I extract Column info for a particular column?

    billross (6/22/2008)


    I want extract Column info for the first three columns in my table:

    Is it a Primary Key?

    What is the Data Type?

    What is the default value?

    I would also like to...

  • RE: display single column data into multiple clolumns

    Kiran.. if you don't want to re-design your database, this query should work (I hope):

    SELECT C.CustomerID,

    C.Name,

    P1.Phone as 'Mobile',

    P2.Phone as 'LandLine',

    P3.Phone as 'Fax or Other'

    FROMCustomer C

    LEFT OUTER JOIN ...

  • RE: Table var maximum row number

    I find table variables are great for filtering out data usnig IN or joins. Queries which need to run against a base selection.. say filter to "n products".. I make...

  • RE: Scheduled Job

    What do you have the owner set as in your schedueld task?

    e.g. A few of our jobs go a bit skew if we don't use a SA acct..

  • RE: pls help...need guidance in this stored procedure

    malar_jay (6/24/2008)


    thnks guys...got a pic of it already and i managed to solve the error with the below alteration done to the stored procedure..thnks again!!

    ALTER PROCEDURE [dbo].[tray_history]

    (

    @history as varchar(15),

  • RE: pls help...need guidance in this stored procedure

    J (6/23/2008)


    Set @strSQL =

    'SELECT * from history_view WHERE ' Phone_Number like ''%' + (@history) + '%'''

    This can only work if the select statement retrieves...

  • RE: Checking for Overlap in Date Ranges

    Goodguy, I know my code fails on one of those tests but I kept the date manipulation as per original logic. I don't know why but seems he is intentionally...

  • RE: Checking for Overlap in Date Ranges

    Hi, we do this all the time.. so I think you can steal my logic.. it's simple enough to not need a tally table?

    SELECT COUNT(RESNO)

    FROM RESERVATIONROOMS

    WHERE RESROOM = ROOMNO...

  • RE: Shifting columns

    Is it possible for all four columns to be NULL?

  • RE: help with duplicates delete please

    When creating tables on the fly using INTO you have to specify column names. You'd think it'd be intelligent enough to know that max(RecordID) should be a col called RecordID...

  • RE: help with duplicates delete please

    george sibbald (5/19/2008)

    b) I cannot get the select into to work - returrns error on execution (not parse) of - 'No column was specified for column 1 of 'd'.' (or...

  • RE: help with duplicates delete please

    Just my thoughts...

    -- Get lowest ID's (whether dups exist or not)

    SELECTMIN(RecordID) as 'RecordID'

    INTO#KeptIDs

    FROMAssociationLinks

    GROUP BY

    WorkspaceEntityId,SourceEntityId,TargetEntityId,Name,RecordStatus

    -- Snapshot all cols for these ID's

    SELECT*

    INTO#KeptData

    FROMAssociationLinks

    WHERERecordID IN (SELECT RecordID FROM #KeptIDs)

    -- Clear table

    TRUNCATE TABLEAssociationLinks

    -- Re-populate...

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