Forum Replies Created

Viewing 15 posts - 2,506 through 2,520 (of 2,894 total)

  • RE: delete a row from parent and all child records

    If your proc "is designed to do the same sort of thing as Access's cascade delete function", why not just set Delete Rule to Cascade for your relationship?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Is a cursor the best way to bulk insert to multiple tables with foreign key?

    That is one of the ways you can do it without a cursor:

    declare @iLastPersonId int

    create table #t_person

    (

    person_id INT NOT NULL IDENTITY(1,1),

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: TSQL

    Can you explain a bit what you mean by idle table?

    Actually triggers are raised on some action (update, insert or delete).

    If you want to raise something when nothing happens...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: query on indexes

    and

    sp_helpindex tablename

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Function with Select * that references a View

    To my knowledge, SQL2008 provides a better and more reliable way to check object dependency in SQL Server than in SQL2005 - it is new sys.sql_expression_dependencies. Some more details...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Help with using mulitple replace in a function

    Jeff Moden (7/19/2010)


    Eugene Elutin (7/19/2010)


    Jeff Moden (7/15/2010)


    Eugene Elutin (7/14/2010)


    Julie Breutzmann (7/14/2010)


    ...

    What would be an efficient way to code this?

    ...

    If you need high-performance heavy string manipulation functions write them as CLR...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Function with Select * that references a View

    doobya (7/19/2010)


    ...

    I have been curious for years how other SQL developers solve these issues - when I ask them

    they just look blank ...

    Other SQL developers may be not generaly using...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Function with Select * that references a View

    Simple answer:

    There is no "more elegant way". You can script executing of sp_refreshsqlmodule for each UDF in your database and run this script after altering any view/table (please note...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Repetitive Operators

    Joe Celko (7/19/2010)


    History. Sybase was written in C on UNIX decades ago. The use of ! and % in SQL is not standard and looks awful

    "!=" it is...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Help with using mulitple replace in a function

    Jeff Moden (7/15/2010)


    Eugene Elutin (7/14/2010)


    Julie Breutzmann (7/14/2010)


    ...

    What would be an efficient way to code this?

    ...

    If you need high-performance heavy string manipulation functions write them as CLR functions in c#. T-SQL...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: using CASE in WHERE clause

    mthurber (7/19/2010)


    Hi,

    I don't think it needs to be that complicated. Does this work:

    SELECT * FROM Tbl1

    WHERE TYPE = CASE @TYPE WHEN 1 THEN 1

    WHEN 2 THEN 2

    ELSE TYPE END

    Regards,

    Mike

    If...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Repetitive Operators

    Praveen Goud Kotha (7/19/2010)


    ...

    Then what is the use of introducing both the operators...???

    ...

    It is matter of preference...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: CONVERT date with century

    Check this one:

    http://www.blackwasp.co.uk/SQLDateTimeCutOff.aspx

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How do I calculate the week number given a date?

    funooni (7/19/2010)


    ...

    Supplying the value value 19 to DATEPART function with the first option 'WEEK', it will return 3 which means this is the 3rd week of the month.

    One more thing...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: searching from comma separated string

    As you table design does look like flat-file and not a proper table of realtional database, I can guide you first how to design the table in relational database...

    Your table...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 2,506 through 2,520 (of 2,894 total)