all groups > sql server programming > august 2004 > threads for saturday august 14
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Display data "rolled up"
Posted by Amy Snyder at 8/14/2004 9:02:26 PM
I have a table that consists of the following:
Name
Office
Instead of displaying the results like this:
Name Office
Joe Smith New York
Joe Smith Los Angeles
Jane Doe Miami
John Adams Chicago
John Adams Cleveland
John Adams Detroit
I would like to dis... more >>
Changing value query
Posted by marwan hefnawy at 8/14/2004 8:10:01 PM
Suppose I have a changing value across time as following:
col_date col_value
1 Jan 2004 17
1 Feb 2004 25
1 March 2004 64
1 April 2004 15
1 May 2004 43
1 June 2004 50
etc.
I want a que... more >>
Interrupt script
Posted by Just D. at 8/14/2004 6:53:33 PM
I have a few questions, maybe it would be easier to put all of them into one
message.
-----
Maybe a simple question. We run a script as a scheduled job task. This
script checks for some changes to the database records and if these changes
are found then it should do some stuff. Can we inter... more >>
How to Count different field values in one SELECT statement
Posted by Marco Napoli at 8/14/2004 4:41:38 PM
I am trying to get different counts from one table from different fields,
but I cannot figure out how to filter each cound in the same SQL Statement.
SELECT COUNT(completed = 0) AS Completed,
COUNT(completed = 1) AS NotCompleted
COUNT(priority =... more >>
Adam M., about your -PIVOT concerns-
Posted by G.C.Mandrake at 8/14/2004 4:40:27 PM
> If you look in the archives of the public sqlserver newsgroups,
> you will see a plethora of requests for pivot functionality. My
> concern is that I feel the current PIVOT implementation
> fails to address those requests adequately...
I feel your pain:(:).
And I want you and everyone to... more >>
Is it possible to use a column name from a SELECT clause
Posted by Daryl at 8/14/2004 4:25:03 PM
Hi
Is it possible in SQL Server to use a derived COLUMN name in the same SELECT
clause
eg
SELECT [Date] AS MyDate, DATEDIFF(n, '12/12/2003', MyDate) AS test
FROM AllDates
thanks
daryl
... more >>
Issue with Update Statement
Posted by Robin at 8/14/2004 4:20:59 PM
If from clause returns more than 1 row the value is only increased by 1.
What changes need to be made to allow it to update the total value by the
number of rows in the from clause.
@aParam is an integer parameter.
update #tmpTotals
set CurrentTotal = CurrentTotal + 1
FROM myData INNER J... more >>
sp_setapprole encryption and .NET
Posted by msnews.microsoft.com at 8/14/2004 1:25:34 PM
If I run
exec sp_setapprole @rolename='app',@password={Encrypt
N'app'},@encrypt='odbc'
from MS query analyzer it sets up okay. I have a guest account in the
public role in the database I connect to run this.
If I am my .Net program and try to run it as follows
strConn="Initial Catalog=MyDB;... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Query Designer Error message - for UPDATE sequence
Posted by DRM at 8/14/2004 1:17:26 PM
I got this message when trying to run below UPDATE - using Enterprise
Manager
The Query Designer does not support the Optional FROM clause SQL
construct.
UPDATE Info
SET Info.U_ID = Codes.U_ID
FROM Info INNER JOIN Codes ON Info.CG_ID = Codes.CG_ID
WHERE Info.L_ID < 100... more >>
SQL 2005 Beta Newsgroup?
Posted by Alan Z. Scharf at 8/14/2004 1:14:31 PM
Is there a separate newsgroup for SQL 2005 Beta?
Thanks.
Alan
... more >>
UPDATE - Simple I thought
Posted by DRM at 8/14/2004 12:25:06 PM
Using SQL 2000 - trying to update one table relevant to information
from another - what am I missing other than a brain?
UPDATE dbo.tblCustomer.Last_Order
SET dbo.tblCustomer.Last_Order = dbo.tblWarehouse.Over_Stock
WHERE dbo.tblCustomer.CG_ID = dbo.tblWarehouse.CG_ID
... more >>
SQL Syntax error in sp and ud function
Posted by Sydney Lotterby at 8/14/2004 11:48:27 AM
(btw I have heard and believe all the comments about the downside to dynamic
sql. This is a special case for me so please, no lectures on dynamic sql
:-)
(SQL2K)
I am trying to create a ud function and sp that I can feed a dbname and
tablename to and get some formatted code output.
The re... more >>
extended property "Formula" in enterprise manager
Posted by anonymous NO[at]SPAM devdex.com at 8/14/2004 9:02:21 AM
I am using sql server 2000. I want to be able to do a calculation after
a update to a row, and put the results in a different column in same
table. For example. A value of 40 is inserted in COL A and 43 inserted
in COL B. If COL B is +/- 5 of CoL A then insert 2 in COL C. Can I do
somethi... more >>
|