Forum Replies Created

Viewing 15 posts - 10,876 through 10,890 (of 13,460 total)

  • RE: Add column at ordinal position programmatically

    OK as I'm testing this, I've found that the code I'm using for the PK/UQ/indexes, which uses sys.views instead of things like sysindexes, makes the proc work only if it...

    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: Add column at ordinal position programmatically

    ok you got me thinking and in the mood, so i rewrote the procedure to get rid of all the cursors.

    it's at least 5 times faster, cleaner code, blah blah......

    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: SQL TRACE

    vinothd (7/6/2009)


    Lowell,

    I tried executing the Procedure on my server and both the trace and the view have sucessfully got created .I have one last question.The Event Viewer tries to track...

    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: Problem with Upgrading collation

    ==edit==

    DOH i didn't see where you tried and failed due to indexes....sorry.

    ==edit==

    here's a script I use to change collation;

    in the example here, I'm grabbing only the top 5...you'd...

    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: Do newbies google ?

    I think a lot of new posters don't have the experience/confidence to make sense of a quality article found on google, and are looking for the teacher/mentor to really rub...

    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: SQL TRACE

    vinothd (7/6/2009)


    Hi Lowell,

    Thanks for u'r prompt reply.I went and viewed the trace thru the view created.

    I have a couple of questions.

    1.Is there any Option to Run the trace for a...

    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: SQL TRACE

    Hi vinothd;

    basically the script does two things, it creates a trace on the server; server side traces do not have an appreciable impact on the server.

    second, it creates a view...

    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: Add column at ordinal position programmatically

    thanks matthew; I'm glad it looks like it might be useful for you.

    it's something i play with when i have spare time; it started out before varchar(max) was available, but...

    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: dynamic sql in 2005

    definitely fatfingered...i meant to say EXEC will use all you pass it, whether concatenated (max) variables or whatever, where sp_executesql is the one that will truncate at 4000; thanks, and...

    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: dynamic sql in 2005

    sp_executesql, even though its an "internal" stored procedure, is still a proc, and it has a parameter that is an nvarchar(4000);

    EXEC is a command, and has no parameters.. just...

    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: Add column at ordinal position programmatically

    How do I programmatically get the schema of the dev table with indexes

    Any help will be much appreciated. If I posted this in the wrong area please straighten me out!

    Thanks

    Matthew

    I...

    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: Not able to see the user tables....

    in addition to what ps said, maybe your friend sent you a backup file which contains more than one backup, and you restored only the first backup in the file,...

    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: Incorrect syntax

    anything in double quotes or square brackets are expected to be a column name, not a static value:

    SELECT 0 AS SupplierID, "All Suppliers" AS CompanyName

    --should be

    SELECT 0 AS SupplierID,...

    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: JOB PERFOREMANCE

    I will add the obvious:

    As you spend more time here, you'll see a lot of posts that help people get away from "procedural" Row By Agonizing Row Processing to Set...

    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: SQL Server 2005 Upgrade - Service pack 2

    service packs are cumulative...so everything that was in SP1 is also in SP2, and everything that was in SP1 and SP2 exists in Service pack 3, so you only need...

    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 - 10,876 through 10,890 (of 13,460 total)