Viewing 15 posts - 1,426 through 1,440 (of 5,504 total)
The first thing would be to get a SQL Server Express edition (version similar to what you use at work) and install it at home or wherever you're planning to...
June 2, 2011 at 8:48 am
peter.draper (6/2/2011)
I understand, in the real data it is date and time, so there should never be that situation 🙂Peter
"Never" will only be enforced by a unique constraint.... 😉
June 2, 2011 at 6:15 am
sqlnaive (6/2/2011)
1. The entire dataset on...
June 2, 2011 at 6:06 am
Arrgghhh!!!
I'm sorry. I didn't look at the original query close enough to spt that it is grouped by a different column than used in the SELECt list.
Here's the revised version:
SELECT...
June 2, 2011 at 5:33 am
Using your original sample:
A1 432 1/1/11
A2 453 1/1/11
A1 555 1/1/11
A1 653 1/1/10
A4 875 1/1/09
Both rows have the same part_no and the same calc_date, but different calc_values. Which one would you...
June 2, 2011 at 5:30 am
Backup and restore?
Meaning: take a backup of the db before starting the tests and restore from backup once the tests are completed.
Question aside: why do you have to revert to...
June 2, 2011 at 5:27 am
Glad I could help 😀
Just make sure you'll never have duplicate date values per datetime column. A unique check constraint would help a lot here.
You might also rethink the column...
June 2, 2011 at 5:22 am
Regarding the syntax error: WHERE needs to be placed before GROUP BY
SELECT P.MAKER,AVG(L.SCREEN) AS AliasColumnNameGoesHere
FROM PRODUCT P
INNER JOIN LAPTOP L
ON P.MODEL = L.MODEL
WHERE P.MAKER = 'LAPTOP'
GROUP BY P.MODEL
But I'd...
June 2, 2011 at 5:16 am
remove the parenthesis around the SELECT statement after insert into tbl_weighcalc(.
June 2, 2011 at 4:49 am
banthis is a table in the same database where the [tb_inspiration] is located.
Obvioulsy, you tried to insert a value that exists in the phrase column of the banthis table. My...
June 2, 2011 at 3:51 am
All you need to do is to adjust the table and column names.
The INSERT INTO approach will work as long as the table you're tryingto insert already exist. Otherwise you'd...
June 2, 2011 at 3:25 am
Why don't you add a computed (persisted) column with a CASE statement expression ( 😉 ) returning the max value you're looking for?
You could also use UNPIVOT against the...
June 2, 2011 at 3:19 am
Something like this?
-- sample data setup
CREATE TABLE #temp
(
part_number CHAR(2) ,
value_ INT ,
Date_ DATETIME
)
INSERT INTO #temp
SELECT 'A1', 432 ,'20110101' UNION ALL
SELECT 'A2', 453 ,'20110101'...
June 2, 2011 at 3:11 am
use the window where you typed your query and run the following query
SELECT @@version
The answer you provided is related to the operating system, not the SQL Server version... 😉
June 2, 2011 at 2:31 am
Straight from the link I posted before:
option 1:
changing the 'table or view fast load' to 'table or view' mode
option 2:
Make sure to check your source and destination steps that may...
June 2, 2011 at 2:28 am
Viewing 15 posts - 1,426 through 1,440 (of 5,504 total)