Viewing 6 posts - 121 through 126 (of 126 total)
it's probably easier to use a cursor to iterate through your first table.
declare @c1 varchar(50), @c2 int
declare @rowcount
declare @sel cursor
set @sel = cursor for
select c1,c2 from t1
open...
January 6, 2009 at 12:52 pm
sure there is, the difference is in c3.
Do the stuff you need where c3 = 0
sqlexecute ("inert into t4 (c1,c2,c3) values (@c1,@c2,getdate())
do the stuff you need where c3 <>...
January 6, 2009 at 12:03 pm
I think he described it pretty well.
Unfortunately t-sql isn't friendly like that. It's difficult if not impossible to do dynamic inserts statements.
What you should do instead of "having insert...
January 6, 2009 at 9:43 am
dude, I don't know why the fool wants to convert it to a varchar, it's part of the requirement on the post.
He has his reasons, they aren't mine. Floor...
January 6, 2009 at 9:28 am
I think it's better to use floor
CAST(ROUND(dbo.invoice_line.qty_shipped, 0) AS varchar(40))
cast (floor(dbo.invoice_line.qty_shipped + .5) as varchar(40))
It's simpler...
January 5, 2009 at 4:07 pm
Viewing 6 posts - 121 through 126 (of 126 total)