Forum Replies Created

Viewing 15 posts - 5,521 through 5,535 (of 7,191 total)

  • RE: Add Spaces to start of figure

    Or something like this:

    SELECT RIGHT(' '+CAST(MyDecimal as varchar(18),18)

    But really, you should be using...

  • RE: Add Spaces to start of figure

    Probably your best bet it to use bcp or SSIS to create your file. If you don't want to do that, please will you explain your requirement better? ...

  • RE: Add Spaces to start of figure

    clarmatt73 (2/10/2011)


    Hi All,

    I am trying to change a Decimal (18,2) to Char(12) which is simple enough however the figure needs to have spaces at the start instead of on the...

  • RE: UPDATE SELECT

    Thanks for taking the time to explain that, Joe. I understand what the problem is now - where you have a many-to-one relationship between the two joined tables, the...

  • RE: Time Periods for Email Notifications

    Another alternative is to remove all the alerts from your jobs, then create a new job to run every 15 minutes to check for jobs that failed the last time...

  • RE: Get Purchase Date as per FIFO

    Anand

    Is there a question there?

    Like I said, no cursor is necessary. Try it the way I suggested, or use the link that Dave posted, and get back to us...

  • RE: Get Purchase Date as per FIFO

    Anand

    No need to use a cursor. Create a Numbers (or Tally) table - search this site if you don't know what that is. Then join your table...

  • RE: UPDATE SELECT

    Joe

    I really don't care that it doesn't port. This is a SQL Server forum and if the original poster had wanted something that works on Oracle as well, he...

  • RE: UPDATE SELECT

    UPDATE t2

    SET column1 = t1.column1, column2 = t1.column2,...

    FROM table1 t1 JOIN table2 t2

    ON t1.ID = t2.ID

    John

  • RE: Getting row duplications based on conditions

    Use the appropriate function for the data type you have. Your code is doing a conversion and then applying a function - this will probably be a performance nightmare...

  • RE: Update Query Fails Table Gets Locked By Select Query

    Shatrughna

    Please can we see your SELECT and UPDATE queries? What does "500 something" mean?

    It sounds as if you're doing SELECT * from a large table, and this is taking...

  • RE: Getting row duplications based on conditions

    I see. This is why you should always provide table DDL as well as sample data. It also explains why your code didn't return an error. I...

  • RE: Getting row duplications based on conditions

    You have to cast a date data type to a character data type before you can use SUBSTRING on it. I took the liberty of using DATEPART instead:

    ; WITH...

  • RE: DBCCC SHRINKFILE

    (1) It looks correct. But check it against the syntax in Books Online.

    (2) Shrinking a file will not remove any data from it.

    John

  • RE: Need help with a WHERE statement

    CREATE TABLE and INSERT statements, please - for each of the three tables. If you want people to help you, you need to make it easy for them.

    Thanks

    John

Viewing 15 posts - 5,521 through 5,535 (of 7,191 total)