all groups > sql server programming > may 2006 > threads for saturday may 27
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
Query - perhaps GROUP BY
Posted by Jon Spivey at 5/27/2006 10:36:25 PM
Hi,
Using SQL Server 2000
I have a table like this
Results
ResultID int primary key
ProductID char(10)
RetailerID int
RetailerPrice money
Some sample data might be
ResultID ProductID RetailerID RetailerPrice
1 1231231234 1 ... more >>
SQL99 Question : Why No Boolean Value Columns
Posted by Russell Mangel at 5/27/2006 8:31:59 PM
I read some of the SQL99 Standard and it provides a Boolean Value for
comparisons, but I was unable to figure out why SQL99
did not allow for a Boolean Column type, on purpose.
Question #1
Why did SQL99 *Not* have a Boolean data type on purpose?
Question #2
Why does Celko call the MS BIT ... more >>
average question
Posted by Howard at 5/27/2006 8:30:14 PM
SELECT AVG(SCORE) AS AVERAGE_SCORE
FROM GRADES
SCORE is an integar column with values from 0 - 5
Now this only returns integer values such as 3, 4...
How can I make AVERAGE_SCORE to be a decimal?
ie 3.452
Howard
... more >>
error-checking on INSERT
Posted by Rick Charnes at 5/27/2006 4:30:49 PM
I'm writing a simple stored procedure in which I use INSERT/VALUES.
What is the best way to do error-checking to ensure that my rows got
written to the table? Is checking @@rowcount the best way?... more >>
Trying to improve Stored Procedure
Posted by vncntj NO[at]SPAM hotmail.com at 5/27/2006 8:14:56 AM
I wanted to know if this stored procedure was an efficient sp?
CREATE Procedure p_generatedata @StartDate smalldatetime, @EndDate
smalldatetime
as
Set Nocount on
delete ttemp_data
Insert into ttemp_data
SELECT appeal_codes, appeal_type, appeal_code,
SUM(total_yes) AS total_yes, SUM(P... more >>
Change Notification needed in .NET
Posted by Mukesh at 5/27/2006 4:36:06 AM
Hi,
Think I want an application (say in C#) that would say "Hello" when a
particular table in the database get 100 rows. For this I could use a
thread that would check the rowcount in every say 1 minute. But the
problem is 1 minute is too much for an interactive application. I can
use lowe... more >>
Same query...???
Posted by MUKUT at 5/27/2006 3:11:25 AM
All,
For my project purpose I need to run the following queries to find
the difference in row count.The table is situated in db1 and db2.I
guess the query 1 and query 2 are same but I got different output(Pls
see below).We are using SQL Server 2000.
1. select((select Count(ROW_ID) from... more >>
Transaction option
Posted by ss at 5/27/2006 2:40:02 AM
Hi,
For developing a transaction-based application for a SQL 2005 database. The
database option READ_COMMITTED_SNAPSHOT is set to OFF, and the database
option ALLOW_SNAPSHOT_ISOLATION is set to ON.
One of the transactions in application performs only read operations. To
optimize the perfo... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SQL query against data on tape...
Posted by Pradeep at 5/27/2006 2:35:24 AM
Hi,
We have about 10 TB of data spread across many legacy systems. We need
to move it to just one SQLServer system. However, we do not wish to
keep all 10 TB of data on harddisk but on digital tapes.
Is it possible to use a digital tape as a database medium for
SQLServer? We must be able to... more >>
Joining three Tables in Sql Server
Posted by Rajeev at 5/27/2006 1:34:30 AM
SELECT
HOSTCurrencyAmt
HOSTCUrrencyCode
HOMECurrencyAmt
HOMECurrencyCode
FROM
ExpenseAmounts
Currencycode can be anything US Dollars, Indian Rupees, Euro etc etc.
Based on the currencycode we have to update the Amounts field for e.g.
IF HostCurrencyCode is US Dollars and HOSTCurrentAMt
... more >>
isolation level
Posted by MarkH at 5/27/2006 12:00:00 AM
We're using ADO.NET and SQl Server 2K.
I'm updating an integer column in a seperate table which I use to hold
sequence numbers for different reference strings.
Together the string and int form a unique code which is we use as user
reference for invoices, orders etc, (the PKs are hidden).
... more >>
Using ranges in between operator ?
Posted by Luqman at 5/27/2006 12:00:00 AM
I want to sum the total of following ranges, saved in a table
Can I do it with one single query >?
Say: select sum(amount) from InvTable where InvNo between frmCode and ToCode
?
Table Name: RptInfo
Name FrmCode ToCode
---------- ---------- ----------
SALES 736... more >>
|