Forum Replies Created

Viewing 15 posts - 6,211 through 6,225 (of 13,460 total)

  • RE: First letter upper case for each word in sql server.

    i tried switching to LOWER as Brandie identified, and i get a function that never finishes executing...in the meantime, i'll post an older version from my supply of 8 differnet...

    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: Concerns on a complete SQL Server 2008 R2 migration

    you'll have to script the jobs, i think; as i remember it,you'll hit a coule of issues:

    system databases cannot be restored between versions or service packs. (ie 2005-->2005SP2, or 2005-->2008,2008-->2008R2,...

    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: Create parameter from getdate() to extract all previous years

    TallyTable?

    something like this:

    SELECT SomeStuff

    FROM BusinessTable

    WHERE FiscalYear IN(SELECT YearNumber --An integer like 2010

    ...

    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: Persisted computed columns not being used correctly by SQL

    wouldn't forcing the optimizer to use merge joins, instead of allowing it to pick what it thinks is best also potentially affect the performance?

    I'll let others expound on why nolock...

    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: Propose this to your boss

    I've had a number of what i thought of as "developer only tools" that i generated to make my life easier suddenly get promoted into tools the QA or helpdesk...

    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: Copying users, roles and permission from one db to another

    well, searching the scripts and articles section here on SSC will get you lots and lots of examples for scripting out users and roles, and object permissions too;

    permissions on the...

    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: Compress folder in to a zip file

    here's another example using 7zip's command line utility:

    my example here shows my exe in a specific path for clarity.

    http://downloads.sourceforge.net/sevenzip/7za920.zip

    "C:\DataFiles\7zip_CommandLine_7za465\7za.exe" a "C:\DataFiles\myZipFile.zip" "C:\DataFiles\" -y

    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: Easy way to search column in a table

    here's soemthing i put together previously:

    this searches an entire database , that is all tables, so you might want to add AND TABLENAME ='YourTable' to limit it's use.

    CREATE PROCEDURE...

    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: how different could it be joining a #temp_table Vs @table_variable?

    your temp table could be materialized as a CTE, and used for further processing...that is allowed in a function.

    show us your function, and we can probably help.

    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: Find lower case field names

    newbieuser (12/13/2011)


    Oh no.. Is there a way to find the non character columns that are in lower case? I should may be run the sql for non character fields first...

    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: Find lower case field names

    only nvarchar/nchar/char/varchar columns with default or check constraints will fail(and this need to be dropped and recreated)...so if you had a check constraint for 'Y' or 'N', or a Default...

    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: Find lower case field names

    what about Proper Cased column names? not just all lower case;

    this will find anything not upepr cased, buy using collation:

    SELECT 'EXEC sp_rename '''

    ...

    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: Query to return which tables and indexes are in each file group and file

    isn't the "table" data stored wherever the HEAP or CLUSTERED idnex type is stored?

    so you can infer that wherever the i.type_desc in(HEAP,CLUSTERED), that's where the table is.

    i added one column...

    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: Multiple RETURNs in an SP

    each exit is going to need a commit:

    IF @condition =1

    BEGIN

    --do stuff (like you said...either raise an error or commit.

    COMMIT TRAN...

    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: Developer tools

    Another option is to change one of the keyboard shortcuts to sp_helptext in SSMS; that's free, which is closer to my usual budget.

    for example, in the screenshot below, i'm calling...

    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 - 6,211 through 6,225 (of 13,460 total)