Viewing 15 posts - 571 through 585 (of 683 total)
And thanks for the feedback ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Hi Elizabeth,
This should give you some ideas and get you started... ![]()
--prepare and show example data
declare @project table (id smallint...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
I'm pretty sure there's no difference whatsoever speed-wise - they will be interpreted in exactly the same way. I prefer between from a readability point of view, but that's just my preference...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Hi Najeeb,
Chillino is right - using a 'numbers' table makes this problem very easy to solve. Here's one way you can achieve what you need. Just run it to see......
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Hi all,
My post doesn't answer Lowell's problem (sorry Lowell!
), but here's a related article I wrote a few years ago...
http://www.sqlservercentral.com/columnists/rrandall/creatingascriptfromastoredprocedure.asp
The title was originally "Creating...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Hi Bill,
Aren't you almost there once you've got the first day of this qtr (as you have). Just take off 3 months for a) and 3...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Something like this... ![]()
declare @orders table (orderid int)
insert @orders
select 1
union all select 2
union all select 3
declare @orderDetails...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Something like this?
declare @t table (RowId int, BCode varchar(4), dt_O datetime, dt_Cl datetime, Type char(1))
insert @t
select 1, '0001', '1/1/6', '1/2/6', 'C'
union all select...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
You might want tor try using both carriage return and line feed...
CHAR(13) + CHAR(10)
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
I agree! ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Hi all,
I wrote this for fun, and thought I'd share it here, since it's vaguely related. It's interesting mathematics (in that the method works) if nothing else. ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Is there a reason why you can't just use substring? Like this...
--This SQL script is safe to run
DECLARE @t TABLE (Id INT IDENTITY, Name_Id...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
The SELECT INTO statement creates a new table and populates it with the result set of the SELECT. The structure of the new...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Viewing 15 posts - 571 through 585 (of 683 total)