Viewing 15 posts - 556 through 570 (of 683 total)
Hi Daryl. Interesting problem - thanks for posting it ![]()
Off the top of my head, here's one possibility...
--data
create table #table1
(id...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
I guess you can simply "pad out" those columns. Something like this...
SELECT id, STR(id, 12) AS IdRightAligned FROM SYSOBJECTS
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
There are a few techniques. Here's my preferred method... ![]()
--data
declare @t table (jobcardn_fk varchar(10), Technician_code varchar(100))
insert @t
select 'jc01', 'TC01'
union all...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
All 3 methods use a tally/numbers/value table and old value setting trick, but that's definitely the neatest yet! Well done, Jeff... ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Bill - Why do you keep asking the same question in different threads? ![]()
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=267409
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=267685
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=267396
There might even be more. ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
As I said, I think the formatting of your question made the request difficult to understand.
I'd like to understand why what I gave...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
From EXECUTE in BOL:
This example creates a stored procedure with default values for the first and third parameters. When...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
It looks like the formatting of your question made the request difficult to understand.
This does the trick (I think), but I've used an id column as a helper, so maybe...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
LOL - I thought about doing it exactly that way, but ended up going the other way to keep things clear. I guess they're really the same way, but definitely...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Viewing 15 posts - 556 through 570 (of 683 total)