Viewing 15 posts - 61 through 75 (of 284 total)
But this would:
create procedure procname
as BEGIN
statement 1
statement 2
...
statement n
END
grant execute to procname to role1
grant...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 20, 2008 at 5:18 pm
Loner (8/19/2008)
A lot of DBA job description these days includes T-SQL, SSIS and Business Intelligence experiences.As a matter of facts, a lot of companies hire DBA/Developer instead of just DBA.
Which,...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 20, 2008 at 4:50 pm
As for preferences, I always use the Begin/End in IF/ELSE constructs but also for stored procs and, yes, I indent the entire block of code. This is personal preference but...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 20, 2008 at 3:34 pm
The index is the best solution, except that as you are querying for the MAX date, then I would override the default and define the index as descending.
create index IX_Name...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 20, 2008 at 12:40 pm
It's not so much that you're not returning a value from a function. You could hard code a return value if you want and it still won't compile. However, the...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 18, 2008 at 12:01 am
I think that one of the methods you could use to make this code a lot easier to work with is to write out just exactly what it is doing...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 17, 2008 at 11:43 pm
You have a many-to-many relationship between stations and categories but have not modeled the intersection table correctly. Instead of
Table2 : StationCategoryLink
SampleData : StationCode ...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 15, 2008 at 4:22 pm
You can truncate the time part and simplify the calculation in one swell foop:
select DateAdd( m, DateDiff( m, 0, @NextMonth ) + 1, 0 );
Leave out the "+ 1" and...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 14, 2008 at 11:38 am
You may want to version the table (see the link in my sig to get a document explaining the details). But that allows you to query the table to see...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 7, 2008 at 7:22 pm
You don't have begin-end delimiters after the else. So only the first print statement (print @pallet) is getting executed when the ifcondition is false. The statements from the second print...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 7, 2008 at 6:40 pm
Valentin Petkov (8/7/2008)
...it is SIMPLE INSERT INTO then SELECT @INDENTITY as ID ....but NULL
You have got to get off the track you are on or it will be very difficult...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 7, 2008 at 2:24 pm
Jeff Moden (8/6/2008)
Heh... provided that an inter rate, tax rate, discount rate, or any other rate is never used.
None of which are Money. All those rates will be Decimal, Numeric,...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 6, 2008 at 7:46 pm
By any chance, would there be an Instead Of trigger defined on the table?
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 6, 2008 at 2:04 pm
meichner (8/6/2008)
I took a seminar a while back where they suggested using decimals and money to avoid rounding issues. I guess they were wrong.
Not exactly. The problem is not quite...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
August 6, 2008 at 1:30 pm
Obviously, what you are trying to do can be done and it makes for a good exercise in solving problems using SQL. However, my advice is don't do it at...
Tomm Carr
--
Version Normal Form -- http://groups.google.com/group/vrdbms
July 29, 2008 at 7:05 pm
Viewing 15 posts - 61 through 75 (of 284 total)