Forum Replies Created

Viewing 15 posts - 181 through 195 (of 232 total)

  • RE: Phone Numbers Table Design

    i think below table design could be use.

    Contact(ContactID, ContactFirstName, ContactLastName, ....)

    PhoneType(PhoneTypeID, PhoneTypeDesc, ....)

    ContactPhone(ContactID, PhoneTypeID, PhoneNumber, Active/Inactive)

    Contact - Store all Contacts information

    PhoneType - Store PhoneTypes E.g PersonalPhonenumber,

    ...

  • RE: Problem with Query window language

    SET LANGUAGE us_english

  • RE: Need output as 1,2,3,...10

    try this code hope this will help you...

    declare @strCVS VARCHAR(500)

    select @strCVS = coalesce(@strCVS + ',', '') + cast(object_id as varchar(10))

    from sys.objects

    select @strCVS

  • RE: Archiving Advice Required

    Need to know more about archiving. I have database its more than 1 database same schema for different clients. I have created Archive databases for each client according to...

  • RE: user tables in database where the number of rows is less than 100

    select distinct object_name(object_id) as Table, rows

    from sys.partitions where index_id >= 1

    and object_name(object_id) not like 'sys%'

    and rows > 100

  • RE: select multiple identity values after insert?

    there is another way which you can use..

    1. Take the MAX(userID) before batch insert. this will give you the last UserID before batch insert

    2. Perform batch insert.

    3. Retrive those records...

  • RE: Reorganize Index Task

    Also verify whether index exists or not from below query...

    SELECT * FROM sys.indexes WHERE name = 'PK__EventStage__46AF6B36'

  • RE: how to get the size of a column from simpleresultset

    the way you are inserting/ updating records is not feasible. it alway a good practice to have the length validation from Application side restrict the user to enter available space...

  • RE: can stored procdure call inside the user defined function

    It very simple to call function with an stored proc. below is an example.

    CREATE PROCEDURE [dbo].[uspGetSkuCode]

    ( @Sku VARCHAR(50) )

    AS

    BEGIN

    SET NOCOUNT ON

    SELECT [dbo].[FormattedSKU](@Sku)

    END

    you will get the value as a...

  • RE: interview question?

    I hope you will get the better answer on BOL, instead everyone tell you in chunks. You can refer to New feature in SQL server 2005 in BOL.

  • RE: Restore DB to a network server

    I agree with nicolas

  • RE: table pivot question

    justin you can use the below code this will help to avoid the hardcoded scopes.

    IF OBJECT_ID('tempdb..#tmpData') IS NOT NULL

    DROP TABLE #tmpData

    CREATE TABLE #tmpData(NameVARCHAR(10),

    TeamVARCHAR(2),

    VolumeSMALLINT,

    ScopeVARCHAR(100)

    )

    INSERT#tmpData

    SELECT'brian', 'G1', 1, '0 to 100' UNION ALL

    SELECT'randy',...

  • RE: Delete Duplicate values

    Kenney,

    I appreciate your suggestion. thank you :).

  • RE: backup

    Can u reply with error message and also with your machine config.

  • RE: Creating new login

    try [Nuser]

Viewing 15 posts - 181 through 195 (of 232 total)