Forum Replies Created

Viewing 15 posts - 46 through 60 (of 73 total)

  • RE: t-sql 2012 calculate age

    wendy elizabeth (8/31/2014)


    In a sql server 2012 database, I have a field called date of birth that is stored in a tha that is stored in a datetime format. I...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Happy Monday

    Good function.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Hypervisor

    Thanks Steve, for the question.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: SQL Server 2008 r2?

    I can see more right answers.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    Now it seems good.

    Thank you admin.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Choose only two correct answers?<!-- 864 -->

    Good basic question.

    Thanks for it.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Msg 824, Level 24, State 2, Line 1 SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:16514; actual 0:0). It occurred during a read of page (1:16514) in database ID 8 at offset 0x00000008104000 in file 'G:\test\test.mdf'. Additional messages in the SQL Serve

    anoosha.konaparthi (8/20/2014)


    im getting this error while executing

    "DBCC CheckDB('test') WITH NO_INFOMSGS, ALL_ERRORMSGS, TABLOCK"

    Msg 824, Level 24, State 2, Line 1 SQL Server detected a logical consistency-based I/O error: incorrect pageid...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    Lee Linares (8/19/2014)


    For my users, they would expect the same answer either way. One way to handle that would be that if the @Fromdate is greater than the @Todate, simply...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    Lee Linares (8/19/2014)


    I see your point. But the end-user would be confused by the output.

    In reality if I were deploying this I would likely disallow the user from inputting...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    Lee Linares (8/19/2014)


    Sure, here are the results of 2 calls using your posted code:

    Select [dbo].[fn_TotaltimeBetweendates] ('06/13/1990', '08/18/2014') -- Returns 24 Years :2 Months :5 Days

    Select [dbo].[fn_TotaltimeBetweendates] ('08/18/2014', '06/13/1990') -- Returns...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Which query will give an error?

    Oh crap.

    Good to know since I'm preparing to take it.

    Use this link to prepare :

    https://www.microsoft.com/learning/en-in/sql-certification.aspx

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Which query will give an error?

    Hany Helmy (8/17/2014)


    sestell1 (8/15/2014)


    XML... yuck. :sick: :laugh:

    Definitly yuck 🙂

    XML Queries may be yuck,

    But you have to prepare this for 70-461, 8 to 10 question comes on exam...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Installing multiple versions of SQL Server Instances on same server

    smatu (8/17/2014)


    Has anyone successfully installed and maintained multiple versions of SQL Server instances on a single server?

    What disadvantages have you encountered maintaining multiple versions of SQL Server instances on...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Parse out the first 3 characters

    I didn't find any error with the code :

    DECLARE @i TABLE( mychar VARCHAR(50)

    ,deriv as SUBSTRING(mychar,1,3) --Use this

    ,newderiv as left(mychar,3));--Or use this

    INSERT @i VALUES ('Steve'), ('Stephan'), ('Stephanie')

    , ('Sterling'), ('Steppenwolf'),('Ab'),('Abc')

    SELECT * FROM...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    Lee Linares (8/14/2014)


    Thanks for taking the time to create and share your code. I found that when the @FromDate was more recent than the @ToDate the returned answer was incorrect....

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

Viewing 15 posts - 46 through 60 (of 73 total)