Forum Replies Created

Viewing 15 posts - 241 through 255 (of 3,232 total)

  • RE: simple delete statement

    My previous example updated the wrong part of the column...thanks to Craig for doing it correctly.

    DECLARE @Table TABLE (Val varchar(100))

    INSERT INTO @Table

    SELECT 'ABCDEF100' UNION ALL

    SELECT 'ABCDEF200' UNION ALL

    SELECT 'ABCDEF300'...

  • RE: simple delete statement

    wannalearn (11/15/2010)


    Thank you for your reply. Per your advice,

    I created

    DELETE ABCDEF FROM dbo.XYZ

    WHERE Column = 'ABCDEF100'

    want to delete ABCDEF AND LEAVE 100 IN THAT COLUMN

    Plz help me create statement for...

  • RE: simple delete statement

    wannalearn (11/15/2010)


    DELETE ABCDEF FROM dbo.XYZ

    WHERE Column = 'ABCDEF100'

    Where are you getting DELETE ABCDEF ? Look in BOL for the basic format of a DELETE statement. It should follow...

  • RE: simple delete statement

    DELETE t

    FROM YourTable t

    WHERE Column = 'SomeValue'

  • RE: How to only export to text where data exist

    Yes. In your Control Flow, just double-click on the connector and it will bring up the Precedence Constraint Editor. For the Evaluation Operation, you'll want to use Expression...

  • RE: How to only export to text where data exist

    I would recommend getting the row count from your table and populating a variable with it. Use that variable inside a precedence constraint. Use an expression to test...

  • RE: Today's Random Word!

    They carry longbows and recurves at places like Bass Pro Shops here in the US. They usually have an indoor range to shoot so I'm sure they'd let you...

  • RE: Working with Cursors

    Wish I could help, I haven't touched (or thought about) Oracle in 6 years....but back when I worked in Oracle, I used the metalink site for support...learned alot there.

  • RE: Working with Cursors

    Gotta love it when you have to answer your own question 🙂

  • RE: Alternative To Cursors?

    You say to "loop through different objects". Can you clarify this? As Gus said, if you really do have to loop, a cursor will do that, but most...

  • RE: Today's Random Word!

    Alaskan King Crab

  • RE: How to print blank lines in the Job's Output Text File using TSQL.

    Try carriage returns/line feeds.....

    SELECT '' + CHAR(13) + CHAR(10)

    + '************************************************' + CHAR(13) + CHAR(10)

    + '* BEFORE BB_BB60 BACKUP:' + CHAR(13) + CHAR(10)

    + '************************************************' + CHAR(13) + CHAR(10)...

  • RE: Week Part

    A cup of coffee and an energy drink makes this all go down easier.

  • RE: Week Part

    Craig Farrell (11/11/2010)


    WayneS (11/11/2010)


    Formula: DATEADD(dd,DATEDIFF(dd,-7,DateOfPurchase)/7*7,-1))

    select DATENAME(weekday, 0); -- = Monday

    select DATENAME(weekday, -1); -- = Sunday

    select DateAdd(day, -7, 0); -- = 18991225

    So, take the number of days between 18991225 (Date=-7) and...

  • RE: Temp Table in View

    Views do not allow temp tables, but you can still use a derived table in the JOIN. Can you provide an example of what you are trying to do?

Viewing 15 posts - 241 through 255 (of 3,232 total)