Viewing 15 posts - 12,886 through 12,900 (of 14,953 total)
Are IX_SubInspectionTypes and SubInspectionTypes tables, or something else?
Also, with the sample data provided, the cur_InspectionGroup cursor ends up with no rows. I'll see if I can figure enough out...
July 11, 2008 at 2:44 pm
Figured it out. You need to move the "X" over one paren.
Tested this:
declare @Results table (
Actual money,
Budget money,
LNum int)
insert into @Results (Actual, LNum, Budget)
select -5, 1570, 5
SELECT 1240,'1800 ...
July 11, 2008 at 2:27 pm
What's the "X" for at the end of each sub-query? It's where a column alias would go, but you don't need a column alias in the second query of...
July 11, 2008 at 2:23 pm
Yeah, two sub-queries and an equality test is pretty tough. I know how it goes. 🙂
July 11, 2008 at 2:20 pm
There's a table called dbo.InspectionItems mentioned frequently in the script, which isn't included in the table definitions anywhere that I can find.
What's the structure, and some sample data, for that...
July 11, 2008 at 2:12 pm
There is no option to activate/deactivate Try/Catch in SQL 2005.
Right-click on the database in Management Studio, select Properties, go to the Options tab, there will be a line on there...
July 11, 2008 at 1:55 pm
Compare the sum of the list, and sum of the absolute values of the list. If it isn't equal, one or more value are negative.
select case
when
...
July 11, 2008 at 1:51 pm
"Sub-query" simply means a query inside another query. Thus, it's an embracive term. A derived table is a type of sub-query, as is an inline query.
July 11, 2008 at 1:46 pm
The other thing you can do, which I recommend in any case where you are working with date-sensitive material, is build a calendar table and query against that.
July 11, 2008 at 11:13 am
Tables with a # at the beginning of the name are temporary tables. Don't prefix it with "dbo." and it should work okay.
July 11, 2008 at 11:06 am
Jeff Moden (7/11/2008)
GSquared (7/11/2008)
July 11, 2008 at 9:53 am
Since an identity column is, generally, unique per row, it already has as high a selectivity as is possible. How would converting it to a string, then reversing it,...
July 11, 2008 at 9:51 am
I think the problem is actually this line, and the others like it:
select @currenttitle = contacttitle from customers
There's no Where clause on there. That means it will always end...
July 11, 2008 at 9:41 am
ctics112 (7/11/2008)
Thanks for the pointers. I did not think of using varchar but i see why. With the tips I got from you and the other two posts I should...
July 11, 2008 at 9:38 am
The other thing that sometimes comes in useful with GO is that you can put a number after it, and it will run the commands before GO that number of...
July 11, 2008 at 9:02 am
Viewing 15 posts - 12,886 through 12,900 (of 14,953 total)