Forum Replies Created

Viewing 15 posts - 8,206 through 8,220 (of 13,460 total)

  • RE: Increment a variable by another variable in a select statement

    the pseudo code doesn't cut it for this one, i think. We'd need to see the actual statement you are executing, that is raising the error, so we can really...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: UPDATE using a self-join

    Horrible example, Celko; all it proves is the row used to to update the parent table is not guaranteed unless you make sure the joins form a 1:1; That's SQL...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Varchar (10) takes so much time

    adding the same WHERE statement for the ORDERPK to each of the CTE's might speed things up also; you be filtering to jsut the rows for the order in...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Varchar (10) takes so much time

    you've got a few things killing you, without the actual execution plan , these are jsut guesses:

    the WHERE statement on ORDERS is not SARG-able.

    instead of doing WHERE DATEADD(dd, 0, DATEDIFF(dd,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: UPDATE using a self-join

    the beautiful part about the "proprietary" update format is the ease in which you can test to see which records are matching/ would be affected.

    simply inserting "--SELECT *", and highlighting...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Simple question - searching for text that contains an apostrophe

    teh same escape method: two single quotes in a row:

    For instance

    Update table1

    set title = 'Daddy''s Daycare'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Simple question - searching for text that contains an apostrophe

    something like this works...the important part is that two single quotes in a row is the escape sequence, so it can be contained within single quotes:

    select * from yourtable where...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: UPDATE using a self-join

    easy fix: once you aliased #example, you have to use that alias everywhere:

    update ex -- the table that will be updated's alias.

    set Status = 1

    from...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SSMS - Query Designer - Any add-in tools to let you MAXIMIZE that window?

    yeah, it doesn't add buttons to the titlebar of a form; it just sintercepts specific keystroke command sand calls the windows API's to fiddle with the widnow size.

    i found that...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SSMS - Query Designer - Any add-in tools to let you MAXIMIZE that window?

    you got me curious with this, and i found SecondShell

    http://www.secondshell.com/

    clicking ALT and mousedrag makes any window stretch in the direction of the alt+drag, and there are programmable hotkey sequences...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: granting execute permissions to ALL stored procedure

    david.alcock (1/11/2011)


    But you could place certain procs, not all, into a schema and assign the permissions to a role at schema level cant you?

    Yes it may be painful...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: granting execute permissions to ALL stored procedure

    i think if you create a role, you can GRANT EXECUTE TO YOURROLE, but that grants execute on all functions as well.

    CREATE ROLE [ReallyReadOnly]

    GRANT EXECUTE TO...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: ReportViewer Licesing

    nope, it's free distributable:

    The Report Viewer Control is a free control provided by Microsoft to display reports on a web page or windows form. To add the Report Viewer...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: DBCC Command

    well, my two cents:

    I have no problem using it for production or anywhere else. It exists in 2005,2008/R2 and Denali/V11 as well... so anything I incorporate using that would...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Rows to Columns

    your data in a format anyone can use in SSMS to look at the problem properly:

    SELECT '1' AS VehicleID,'Honda' AS CarName,'Smith' AS VendorName,'20' AS Quantity,'25000' AS Price UNION ALL

    SELECT '1','Honda','Ross','30','20000'...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 8,206 through 8,220 (of 13,460 total)