Forum Replies Created

Viewing 15 posts - 12,031 through 12,045 (of 13,460 total)

  • RE: Running sp_who2 as a scheduled job in sqlserver 2000 ?

    this was a neat question; you could schedule the procedure I made belowto run every thirty minutes, and query the table WHORESULTS on demand:

    [font="Courier New"]CREATE PROCEDURE PR_CAPTURESP_WHO

    AS

    BEGIN

      SET NOCOUNT ON

      IF NOT...

    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: Importing CSV files without knowing destination schema

    maybe a comma in the exisitng data is affecting the real data you are looking at...

    Can you search the file for a pre-existing commas before you replace the tabs 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: Importing CSV files without knowing destination schema

    well your example shows up just fine for me...

    renamed the file to "Artists_mini.csv" ,as only one period is allowed to exist for a text server to see it:

    selected...

    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: Importing CSV files without knowing destination schema

    thomas.lemesurier (8/28/2008)


    Hmmm, sorry that this is dragging on everyone, now that I have the files in the right place (;)) the tables are being picked up. However, when I open...

    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: Importing CSV files without knowing destination schema

    here's my suggestion:

    add a folder which contains all of your .csv files as a linked server.

    a text linked server will show evert .txt file and every.csv file as a table...

    so...

    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: Table Valued Function in SSIS

    not enough information I think...Can you post the full CREATE FUNCTION statement you are using?

    I'm guessing from what you posted the "parameter" you are trying to pass is a tablename...

    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: XP_FileExists Not Seeing File

    Rbarryyoung is exactly right...typically, the account used for running the SQL server service never logs into the domain, and so does not have permissions/cannot browse to a different machine on...

    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: cannot get parents records which do not exist in child record using 'leftjoin'

    maybe you need to filter so you get JUST the parent records?

    slight change by adding a WEHRE clause, and changing which Oid to select like this?:

    [font="Courier New"]

    SELECT

      o.Oid,

      x.employeeID,

      o.changedate,

      e.followupdate,

      o.date

    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: cannot get parents records which do not exist in child record using 'leftjoin'

    it's just your INNER JOIN at the very end that is exluding the records you were looking for; simply change to this i think:

    [font="Courier New"]

    SELECT

      x.Oid,

      x.employeeID,

      o.changedate,

      e.followupdate,

      o.date

    FROM

      (SELECT

        ...

    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: Most hits on tables

    aww too bad your on 2000; I found Jack's suggestion really interesting and slapped this together real quick and it gave me promising results:

    [font="Courier New"]

    SELECT

    DB_NAME(database_id) AS dbname,

    OBJECT_NAME(OBJECT_ID,database_id) AS tablename,

    SUM(user_seeks) AS...

    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: removing appended dash

    yeah, looking at it again, i might suggest assuming just 5 characters:

    JOIN ON LEFT(tbl1.ZIPCODE,5) = LEFT(tbl2.ZIPCODE,5)

    that way you ignore bad data, as well as 9 digit zipcodes.

    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: TXT file for each table

    Crispin Proctor (8/20/2008)


    Handy script (even if I don't agree with the approch) but handy non the less...

    Instead of sysobjects and syscolumns etc, rather use the catalog views sys.objects and sys.columns.

    I'm...

    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: removing appended dash

    ctics112 (8/20/2008)


    Greetings,

    I am trying to join two tables AgentAddresses and ZipCodes on a field called zipcode in to create another table named Agents however several thousand fields in Agent Addresses...

    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: TXT file for each table

    well, avoiding SSIS, this seems to work; in order to gett his to work, i had to enable xp_cmdshell, and change the credentials for the account that sql server runs...

    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: Arithmetic overflow error converting varchar to data type numeric.

    ryansegg (8/19/2008)


    select CAST('0061' as numeric(4,3))

    This is silly but I'm stumped by this statement giving me an error.

    Ultimately what I want is to insert '0061' in a column of type numberic(4,3)....

    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 - 12,031 through 12,045 (of 13,460 total)