Forum Replies Created

Viewing 15 posts - 9,436 through 9,450 (of 13,460 total)

  • RE: T-SQL query to exclude certain rows

    here's the second part of your calcualtion as well, i think:

    ;with myCTE as (

    select row_number() over (order by odometer,event) as comprow,* from

    (

    select row_number() OVER (PARTITION BY odometer,event order by...

    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: T-SQL query to exclude certain rows

    clive thank you for making this so easy....the table definitions and data helps enourmously!

    you rock!

    here's how i'd "ignore" the double events in a row; i'm using row number and 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: Replace Function Doesn't Seem to Work

    imani_technology (5/18/2010)


    One small problem: the Derived Column Transformation doesn't seem to recognize Char(10). Here is what I used:

    (REPLACE(ReplacedDealName,Char(10),""))

    sorry thought this was pure SQL;

    i belive in SSIS, you have...

    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: LOGINS - Who Created it and When

    looks like you'll need to add a trace specifically for login events.

    it's not part of the default trace, i both tested it and checked the default trace's definition...no login audits...

    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: Insert Summary Record After Stripping Old Records

    goodguy, why not build a view that creates the summary that you are looking for?

    I avoid at all costs replacing detail data with summary data...besides the possbility of a mistake,...

    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 multiple DB's

    three part naming conventions is how i often do it:

    Select ColumnName from DBname1.dbo.Table

    UNION ALL

    Select ColumnName from DBname2.dbo.Table

    UNION ALL

    Select ColumnName from DBname3.dbo.Table

    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: Replace Function Doesn't Seem to Work

    i would go with something simple:

    Replace(FieldWithCrLf,CHAR(13) + CHAR(10),'')--vbCrLf

    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: Replace Function Doesn't Seem to Work

    imani_technology (5/18/2010)


    The source column looks something like this:

    XYZ12A01[FOUR ODD SQUARES]LP_EXL_ID

    Then I use the following REPLACE function within a Derived Column transformation:

    LTRIM(RTRIM(REPLACE([Column 0],"LP_EXL_ID","")))

    The destination column is varchar(200). 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: DB connectivity issue with sql server 2000 named instance

    enable remote connections on your SQL 2000; i belive by default express versions set remote access as off, and you have to turn it on:

    exec sp_configure 'remote access', 1

    reconfigure

    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: Proper Case Only If All Caps

    some great code suggestions

    from a similar thread where someone needed to detect if lower case/upper case character exists:

    http://www.sqlservercentral.com/Forums/Topic800271-338-1.aspx

    this would check if the string is all UPPER:

    DECLARE @string VARCHAR(10)

    SET @string =...

    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: Deleted store procedure

    the SSMS GUI has a built in report that taps the default trace , filtered by database name; it's a bit easier to use that querying the default trace directly:

    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: Open URL using t-sql code

    yeah i'm thinking TSQL/SQL Server might be the wrong tool for the task...you can do it, but it sounds like you just want a keep alive hitting your site...maybe your...

    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: xml schema definition for the database tables

    lets just cover all the bases;; you created a connection , correct? then you can expand the conenction to show the tables, multi select and drag and drop:

    you VS should...

    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: leading blanks

    i think you jsut need to wrap the Tiutle column with the isnull function:

    select RIGHT(' '+CONVERT(VARCHAR,ISNULL(Title,'')),40) AS Title

    from ADDRESS;

    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: Output of system stored procedure to temp table

    not sure about the error; it's so wierd that it refers to a backup.

    whenever i've used sp_msdependencies , i've always used the parameter @intrans = 1 ,

    and 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!

Viewing 15 posts - 9,436 through 9,450 (of 13,460 total)