Forum Replies Created

Viewing 15 posts - 706 through 720 (of 2,894 total)

  • RE: Interview Questions

    On interview, I would just go with the following:

    SELECT TOP 12 IDENTITY(INT,1,1) N INTO #sample FROM sys.columns

    SELECT s1.N, s2.N, s3.N, s4.N

    FROM #sample s1

    JOIN ...

    _____________________________________________
    "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: UNION vs OR --> NP-Complete Problem

    ScottPletcher (2/6/2013)


    No, I wouldn't use OR just because that makes a view updateable -- UPDATEs aren't typically done using views like that anyway.

    What is the problem with updateable VIEW? I...

    _____________________________________________
    "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: DELETE against same table that has INSERTS

    JP10 (2/6/2013)


    How do we avoid blocks or performance down grade against a table that has deletes and inserts against it?

    Every 2 seconds there is about 4000 inserts and I want...

    _____________________________________________
    "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: Alternate to Joins

    Bhuvnesh (2/6/2013)


    Many Joins means "poor database design"...

    Really? Did you ever worked with data warehouses?

    _____________________________________________
    "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: Trigger with where clause

    sqlstar2011 (2/5/2013)


    I would like to create a trigger that only gets executed when a specific field in a table is updated or a new record with a non null value...

    _____________________________________________
    "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: UNION vs OR --> NP-Complete Problem

    karthik M (2/5/2013)


    I have recently read about this in the below link.

    http://www.sql-server-performance.com/2013/tsql-incorrect-union-operator/

    I just heard about "NP-Complete Problem" first time 🙂

    From Joe Celko...

    This UNION vs OR problem has been in 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: Delete from Two tables in Single Statement (without Cascading)

    Mr. Kapsicum (2/5/2013)


    thanks sscrazy.........!!!!

    it's a quick response.

    There is nothing about consistency......... its just a question that someone asked me to do so..... he says its possible....!!!!

    Trigger,OUTPUT, cascading are possible solution...

    _____________________________________________
    "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: Delete from Two tables in Single Statement (without Cascading)

    I want to delete these records from both the table in single DELETE statement. and DON'T USE CASCADING.

    Need Help..............a bit urgent..........!!!!! :-):-D

    It is impossible in SQL.

    You can not DELETE...

    _____________________________________________
    "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: TimeZone conversion in sql server 2008

    This function applies offset to the given datetime. You need to keep or calculate somehow proper offset, in order to apply it.

    http://msdn.microsoft.com/en-gb/library/bb630289.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: TimeZone conversion in sql server 2008

    There is datetimeoffset T-SQL function to help you. You will need to keep time offset in form of [+|-] hh:mm, in order to use it.

    _____________________________________________
    "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: TimeZone conversion in sql server 2008

    Do you know in what "zone" your datetime is saved? If not, then there is no way to convert it reliably to UTC.

    Usually, if your system needs 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: split string to three parts

    Actually you don't even need CROSS JOIN, I've edited my previous post...

    _____________________________________________
    "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: split string to three parts

    Another one:

    declare @Word1 varchar(100), @Word2 varchar(100), @Word3 varchar(100)

    declare @str varchar(100) = 'Word1,Word2,Word3'

    --declare @str varchar(100) = ',Word2,'

    --declare @str varchar(100) = ',,Word3'

    --declare @str varchar(100) = 'Word1,,'

    --declare @str varchar(100) = ',,'

    SELECT @Word1 =...

    _____________________________________________
    "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: split string to three parts

    If you are talking about splitting single string (let say passed as parameter) into three variables, you don't really need a function, as you will not get much benefits from...

    _____________________________________________
    "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: Adding comma separator to INT datatype

    ...

    I am just going from what my Europe users have complained all along: The invoices/reports coming out of the "american" system when the currency is Euros, are difficult to read...

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