Viewing 15 posts - 5,521 through 5,535 (of 7,191 total)
Or something like this:
SELECT RIGHT(' '+CAST(MyDecimal as varchar(18),18)
But really, you should be using...
February 10, 2011 at 8:14 am
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? ...
February 10, 2011 at 6:47 am
clarmatt73 (2/10/2011)
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...
February 10, 2011 at 5:18 am
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...
February 2, 2011 at 4:06 am
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...
January 28, 2011 at 8:46 am
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...
January 28, 2011 at 5:17 am
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...
January 28, 2011 at 4:25 am
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...
January 28, 2011 at 2:04 am
UPDATE t2
SET column1 = t1.column1, column2 = t1.column2,...
FROM table1 t1 JOIN table2 t2
ON t1.ID = t2.ID
John
January 27, 2011 at 8:47 am
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...
January 27, 2011 at 7:08 am
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...
January 27, 2011 at 6:33 am
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...
January 27, 2011 at 4:58 am
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...
January 27, 2011 at 4:44 am
(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
January 25, 2011 at 2:08 am
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
January 24, 2011 at 8:56 am
Viewing 15 posts - 5,521 through 5,535 (of 7,191 total)