Viewing 15 posts - 11,551 through 11,565 (of 13,469 total)
the sum() function does not take a comma delimited list: change all the commas to plus signs to sum all the columns and all the rows:
select SUM (e.GROSWAGS_1 +...
February 20, 2009 at 4:42 pm
ok, i copied and pasted your ocde, and found the #fraglist gets populated just fine.
the second cursor "index" never ran on my machine, because the condition below was never met:...
February 20, 2009 at 10:37 am
yeah the issue is db_id can return null:
select db_id('Bob')
i doubt you have a 'Bob' database...
your example would actually be
select * where x not in (1,2,3,NULL,NULL) --<<--NOT IN NULL RETURNS...
February 20, 2009 at 10:03 am
you want to test IF EXISTS(any rows in logger2)
not that (somequery = 0)--you weanted to count the rows or something, right?
so you'd want to tweak it to something like this:
IF...
February 20, 2009 at 9:55 am
damn...i just tried to do it, so i could script out the linked server commands, and i get "cannot create a linked server from a local server" from the gui.
anyone...
February 20, 2009 at 9:46 am
In SQl 2000, I can't think of an easy way.
in SQL 2005, you could use a synonym...for example two synonyms like
PRIMEDB and OTHERDB
and the query could refer to
...
February 20, 2009 at 9:30 am
well kind of...there is no such thing as a sequence number in SQL, but the Identity() has the equivalent for any given column...if you set the identity() on the column,...
February 19, 2009 at 1:32 pm
SQL server is a little bit different than other languages like Oracle.
there is an Identity() property you can set on a column, which has the same effect that a sequence...
February 19, 2009 at 1:22 pm
I personally use the 997 milliseconds, otherwise it;'s the next day.
SET DATEFIRST 1
declare @mon datetime,
@fri datetime
SELECT...
February 19, 2009 at 8:34 am
very weird...i created a new email address for myself on my email server, and changed my email notification address here on SSC to the new one; could you please just...
February 18, 2009 at 6:52 pm
psuedocode sucks....when you abstract the real problem, you get crappy answers, that you end up having to explain lots of times till you come around to teh real answer. Show...
February 18, 2009 at 4:34 pm
here's an example for you to look at:
stuff all values into a column
------------DDL----------------
create table test (id int identity, category varchar(100),
name varchar(100), allnames varchar(8000) null)
insert test (category, name)
select 'fruit', 'apple' union...
February 18, 2009 at 1:19 pm
i think either your server is SQL 2000, or the database's compatibility level is still sitting at 80 instead of 90. the xquery is a 2005/90 feature.
change your compatibility level...
February 18, 2009 at 1:10 pm
like others said, you have to JOIN the two aliased groups:
Select
ALIAS1.naam,
ALIAS1.Aantal_Incidenten,
--ALIAS2.naam, --now that they are joined, no need to repeat
ALIAS2.Aantal_Inc_Portal
FROM
(
select vestiging.naam, count(*)...
February 18, 2009 at 1:00 pm
if you add a tally table, this is one of those magical Tally table wonders that extracts between two delimiters: it pulls out the ID and each of the Id's...
February 18, 2009 at 11:43 am
Viewing 15 posts - 11,551 through 11,565 (of 13,469 total)