Forum Replies Created

Viewing 15 posts - 4,576 through 4,590 (of 13,460 total)

  • RE: sysobjects shows table not in database

    i think the table might be in another schema, but you are assuming it's in the dbo schema, since that's what is your default.

    try this instead...what schema does it 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: Relationship between tables

    where's the query you are refering to? did you forget to paste it so we can help you?

    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 the output in excel

    here's a tested example;

    I've created a spreadsheet that has the contents of sys.servers.

    you can grab a copy of it here:

    SysServers_Example.xlsx

    and the code, assuming 64 bit SSQL 2008 with the 64...

    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 the output in excel

    sqlrd22 (10/16/2012)[hr

    Use SQL Server Agent job to run the query every night.

    And try BCP (xp_cmdshell BCP if using SSMS) to output to an Excel file.

    BCP only does raw text files,...

    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 and populate a Zip file

    here's an xp_cmdshell example, like John mentioned above.

    the list of files, isntead of being a single file, can be a space delimited set uf multiple files.

    --http://www.7-zip.org/download.html

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

    --xp_cmdshell is limited to ONE...

    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: Types of DBA's ???

    Hybrid DBA

    Accidental DBA

    😀

    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: split column pipe delimited

    ok, adding WITH SCHEMABINDING to my scalar function cuts half a second off of my performance, so it goes to 7.5 seconds or so instead of over 8 seconds.

    DelimitedSplit8K...

    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: split column pipe delimited

    ok Dwain, I love these performance tests.

    here's a setup comparing my crappy scalar function to your solution.

    the DelimitedSplit8K pivot was roughly 4x faster on a million rows: 8 seconds vs...

    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: Reset the Number by Column Value using ROW_NUMBER() OVER (PARTITION BY Field)

    patelmohamad (10/16/2012)


    Thanks Lowell for instant reply,

    This is my predication, not the actual data

    , actual data is differ from my Example

    in my data it gives me lot of no's 1,2,3.......n or...

    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: trigger to write to two tables

    the trigger is using the base table, isntead of just the new rows that exist in the special virtual tables INSERTED AND DELETED

    this will insert just the new rows:

    CREATE TRIGGER...

    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: Reset the Number by Column Value using ROW_NUMBER() OVER (PARTITION BY Field)

    patel i see what you are asking, but i don't see the data reflecting something that allows it to beswitched like that;

    about all i can suggest is a UNION 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: Exclude all but date characters in SQL 2008

    it's a little tough with denormalized data;

    ideally you'll want to change the schema if you can to store dates in date columns, and notes in a seperate column; but we...

    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: Exclude all but date characters in SQL 2008

    where ISDATE(A) = 1

    AND CONVERT(datetime,A) > DATEADD(dd,-7,Getdate()) --7 days? 8 days? what's minus one week for you?

    --AND CONVERT(datetime,A) > DATEADD(ww,-1,Getdate()) --1 week?

    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: Restoring SQL2008 Enterprise Edition db into SQL2008 Standard edition question

    you might want to buy a copy of developer so you can restore and test teh client backup, even if they are using enterprise only stuff like compression;

    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 read trace table

    well it's a table of data now, so you can do your normal queries with group by and stuff like that.

    here's a crappy group by example i just tested: like...

    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 - 4,576 through 4,590 (of 13,460 total)