Forum Replies Created

Viewing 15 posts - 5,551 through 5,565 (of 13,460 total)

  • RE: Need help creating textfiles from a recordset in SQL Server 2008 R2

    jonas.kasper (4/30/2012)


    It works fine allthough I couldn't use varchar(max)... Had to state a difinitive number (8000)...

    Another question: How do I go about to start writing the text at line 7...

    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 to do RCA (Root Cause analysis)

    Simha24 (4/30/2012)


    Hi Gail ,

    In my CASE, All SQL Sever engine versions are same (4 nodes are running with SP3) where as client tools on 2 Nodes are running with...

    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: Need help creating textfiles from a recordset in SQL Server 2008 R2

    it's easy...create the entire string as one variable, and then execute it via xp_cmdshell.

    the issue is you cannot replace a variable with a concatination for most procs, like xp_cmdshell

    it's prety...

    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: histogram of image

    Larry I'm not sure what you searched for.

    drawing of any kind is going to have to occur outside of SQL server.

    potentially, you could make a CLR to do the work,...

    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 can i create pipe delimited txt file from sql query results

    EXECUTE master.dbo.xp_cmdshell 'bcp "SELECT object_name(object_id) As TbLName,name as ColName FROM SandBox.sys.columns ORDER BY object_name(object_id), column_id" queryout C:\Data\Objects.txt -t"|" -c -T '

    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: Determine whether a database was ever upgraded?

    opc.three (4/26/2012)


    It's a good idea to make sure Data Purity was run cleanly since the upgrade. The info is on the same page Gail pointed you to 😉

    CHECKDB From Every...

    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: Determine whether a database was ever upgraded?

    awesome info Gail;

    my db in question had dbi_createVersion = 539 in the code, which your link showed me was SQL 2000, sure enough.

    Thank you very much! I added...

    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 getting confused

    I think Lynn nailed it; In SSMs if you go to Tools>>Options

    then expand SQL Server Object Explorer and select "Scripting", a form opens, and one of the options is "Script...

    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: Determine whether a database was ever upgraded?

    about the only thing i can find so far that implies a previous version in my sample system is in sys.databases like you pointed out, the previously "default" setting of...

    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: Convert(Varchar,GetDate(),???) - List of Format Codes

    very simiar to mine;

    i put this proc in master, adn whenever i need to refresh myself with date conversions, i just run "sp_dates" in SSMs, to get a quickie preview...

    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: Converting user defined functions to system defined functions

    I just did a quick proof of concept, and my first thought is you can't do it without some changes/find replace in the code just before you execute it...the functions,...

    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: timeout even after (NoLock)??

    the timeouts probably has a lot more to do with the WHERE statements that is the part of the query.

    the execution plan that is created/reused to satisfy the WHERE clause...

    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: Stumped on a SQL Query

    here's an example of providing your data in a readily consumable format:

    i took your post and ran it thru a few find-and-replace macros to get it like this:

    With MySampleData (...

    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 2k >> sql 2k8: text, ntext and image

    the data types remain as they were.

    the data types text, ntext and image are still valid data types, but it is recommended to change them to the newer types...

    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 second occurence of a word

    PSB (4/23/2012)


    Hi,

    I have a table named ABC. It has a field named Y and Z.

    Y='ABCDEFG (9105) CDD ABCDEFG (1690) ENGINEERING'

    I want to find the second instance of...

    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 - 5,551 through 5,565 (of 13,460 total)