Forum Replies Created

Viewing 15 posts - 2,836 through 2,850 (of 2,894 total)

  • RE: Set a variable equal to an Execute?

    You can do it by using sp_executesql instead of "Execute".

    sp_executesql allows to specify output parameters.

    _____________________________________________
    "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: Selecting data relative to two Date columns

    Do you store date and time in your datetime column or just a date?

    If you need to store only date and your table is going to contain very large volume...

    _____________________________________________
    "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: Constant Scan vs Clustered index scan

    No.

    What I mean by in-line SQL is the required functionality is implemented in the SELECT query itself.

    Let say you want to format the date field somehow exotically.

    Having it done in...

    _____________________________________________
    "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: Constant Scan vs Clustered index scan

    Working with very large datasets (in one of the largest datawarehouse implementations based on SQLServer in the world) we found that from performance point of view it always better to...

    _____________________________________________
    "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: Getting most common value from several fields into one record

    I have an idea for Read and Write method which will not use any separators to simulate serialization of Dictionary. I will do it on Monday.

    Is anyone know the best...

    _____________________________________________
    "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: Can we write a SELECT query without using the keyword FROM

    Ah -- but did you realize that you need to use "UNION ALL" instead of just "UNION" statements here -- otherwise, SQL will sort each selected "row" in order to...

    _____________________________________________
    "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: Can we write a SELECT query without using the keyword FROM

    The best use of SELECT without FROM

    IS DRAWING PICTURES

    (switch to text output before execution):

    select '0000^===========\0000' as [picture]

    union select '000/^\__________\\000'

    union select '00//0\\__________\\00'

    union select '0//000\\__________\\0'

    union...

    _____________________________________________
    "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: Changing the seed and increment values on the identity column

    Sorry, it most likely will not work as it looks like since 2005 sp2 updates to sys catalogs are not allowed (special thanks to MS as they always now better:-)).

    I've...

    _____________________________________________
    "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: Changing the seed and increment values on the identity column

    My stupid laptop keyboard...

    To update system catalogs, you will need to use DAC and run server in single-user mode.

    _____________________________________________
    "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: Changing the seed and increment values on the identity column

    I have not tried it myself. Just idea:

    There is a table called sys.identity_columns

    It contains the details of all identity columns.

    Try to change it!

    You will need to use DAC...

    _____________________________________________
    "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: Can you do a calculated test field with data from two tables?

    Also, you can create trigger on insert/update which will look up your surname...

    _____________________________________________
    "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: Can you do a calculated test field with data from two tables?

    you can update view in SQL Server. Read about "instead of" triggers

    BTW, what you're trying to do is looking very wrong...

    _____________________________________________
    "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: Can you do a calculated test field with data from two tables?

    You can create view for that

    _____________________________________________
    "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: Tricky Aggregation

    I would suggest you first copy your data into another temp table with sorting out overlapping date ranges ad then proceed with the query.

    But if you are lazzy you can...

    _____________________________________________
    "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: SQL Function Issue.Getting Strange Result

    Didn't anyone told you that "SELECT * FROM TABLE" is a bad habit 🙂

    I afraid you will not be able to achieve what you want with UDF.

    I can suggest to...

    _____________________________________________
    "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,836 through 2,850 (of 2,894 total)