Viewing 15 posts - 61 through 75 (of 106 total)
quote:
As you're wanting to truncate rather than round, I think cmore means:
SELECT ROUND(1,-2,1)*ROUND(b,-2,1)If the vales are an integer...
November 25, 2003 at 1:55 pm
declare @MyNumbers table (a int not null, b int not null)
insert into @MyNumbers select 345,234
insert into @MyNumbers select 567,345
select round(a,-2,0)*round(b,-2,0) from @MyNumbers
November 25, 2003 at 12:54 pm
I can't think of a way. To me it seems odd that you would need to track something based on a select and not a data modification. What...
November 25, 2003 at 12:30 pm
go
create function dbo.tfnCustomerQuery(
@CustomerID nchar(5)
,@CompanyName nvarchar(40)
,@ContactName nvarchar(30)
,@ContactTitle nvarchar(30)
...
November 25, 2003 at 12:23 pm
If prepared sql/string executes wont fit the bill, how about:
set rowcount 10000
<do query>
set rowcount 0
Or if you have to have this logic in a view/udf instead of a stored procedure...
November 25, 2003 at 12:18 pm
Unless it's a very limited environment, I tend to avoid using global temp tables. Never have liked the way it can make people step on each other.
November 24, 2003 at 8:01 am
Perhaps the app is firing an 'update' that isn't changing the values of an existing row (it'll still fire even with no real data value changes)? Never heard of/seen...
November 24, 2003 at 7:31 am
November 24, 2003 at 7:21 am
there's several of string manipulation functions in SQL online help. I'm no expert on them all but the replace function would work.
November 21, 2003 at 12:36 pm
I meant that the other way- if you custom code a loop to build a heirarchy from a rowset of child/sponsor records, you don't have to worry about a depth...
November 21, 2003 at 11:56 am
Just an option- doesn't do anything more than what sainswor99's code did tho:
after table creation and fill run
declare @x table (
IDCol int identity(1,1) primary key -- provides clustered index
,RowID...
November 21, 2003 at 11:50 am
Looking at my DB im working on atm, I see two bit fields; XPOUsable and BoxUsable ( whether a shipping carrier allows APO/XPO and box addresses). Not really sure...
November 21, 2003 at 11:28 am
Maybe I'm not using it wisely then. I use it when I need to have a 'flag' variable, that I am sure will never need to determine two different...
November 21, 2003 at 10:50 am
Hehe - that was very well said.
November 21, 2003 at 9:35 am
K. Wasn't sure how wierd i was being. As for your script, it's right on imo. I've had code generator scripts save me a ton of time...
November 21, 2003 at 9:22 am
Viewing 15 posts - 61 through 75 (of 106 total)