Forum Replies Created

Viewing 15 posts - 2,386 through 2,400 (of 2,462 total)

  • RE: Regular expression in T-sql

    Jeff Moden (9/28/2012)


    XMLSQLNinja (9/27/2012)


    CELKO (9/15/2012)


    ...And then there is a high cost of CLR. .

    Hogwash. There is nothing "high cost" about a well written CLR.

    Avoid this kludge if you...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Regular expression in T-sql

    bteraberry (9/28/2012)


    Microsoft invested a huge amount of effort/time/money into CLR to give us tremendous capabilities. I have been told by someone close to the SQL dev team at MS...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Regular expression in T-sql

    CELKO (9/15/2012)


    ...And then there is a high cost of CLR. .

    Hogwash. There is nothing "high cost" about a well written CLR.

    Avoid this kludge if you can.

    There's nothing "kludgy"...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Practical used of database id

    Shadab Shah (9/6/2012)


    Thank You

    no problem. 😀

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Practical used of database id

    Each database has a unique identifier. The system databases are always 1-4: Master: 1, TempDB: 2, model: 3, msdb: 4. You see get them all with:

    select database_id, name from sys.databases

    DBAs...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Query runs forever following database migration (2005 - 2008)

    My experience has been the same as Ryan's... Indexes not getting moved into prod and they would not be much help without rebuilding your stats as previously mentioned.

    Take a...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: How to find a Query in all stored procedure

    Shadab Shah (9/5/2012)


    Hi Alan,

    I tried your solution also but 🙁 your solution is also not working.I tried to find out what was wrong with your query but as far...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: How to find a Query in all stored procedure

    Eugene Elutin (9/5/2012)


    I can not see any points of trying to search for a specific query which can be implemented in unlimited number of ways. Eg. comments, white spaces, multi-lines,...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: How to find a Query in all stored procedure

    This should do the trick (building on Robert's query and Luis's suggestion) :

    -- pass the query text as search string variable

    DECLARE @query varchar(1000)

    SET @query =' INSERT ...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Help with IF EXISTS and non existent column.

    I think this is what you are looking for (if not exactly, should be close enough):

    -- test table and test data

    --CREATE TABLE ssc_test

    --(

    --x int,

    --y int,

    --z varchar(20)

    --)

    --INSERT INTO ssc_test

    --SELECT 1,1,'old value'

    --UNION

    --SELECT...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Using Access to put data into SQL Server

    wayne_hudson3 (9/3/2012)


    Access will only display the first record from a table on a form.

    You will have to add a grid or some other mechanism to show all records.

    Just to clarify:...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Using Access to put data into SQL Server

    mrwillcostello (9/2/2012)


    ...I want to use this Access form (which contains all columns from 5 tables) to enter data into the SQL Server database. Please a little guidence would be greatly...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: What do you use for creating admin utilities

    I concur 100% with grant. You can do a ton with TSQL, use Powershell for stuff you cant do with TSQL.

    Redgate tools are awesome too: The comparison utilities (schema...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Policy management

    I have used policies to ensure developers create objects in the correct schema. E.g. We want stored procs in environment X to go into schema xxx.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Loading the distinct rows in the destination table fromt the source table with some logic

    Sean Lange (8/30/2012)


    And it won't work if the OriginalAircraftNumber should be 847 and the FinalAircraftNumber should be 55. Also I am not quite sure the case statement will work exactly....

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 2,386 through 2,400 (of 2,462 total)