Viewing 15 posts - 1 through 15 (of 22 total)
even if price is coming that doesnt matter but my objective is to find average of 750 speeed.that is 850+950/2= 900
June 8, 2011 at 9:08 pm
I USED THIS QUERY AND THIS IS RETURNING CORRECT FOR ALL EXCEPT 750 BUT I WANT AVERAGE FOR 750 ALSO...(like it has to be 850+950/2 = 900)
________________________________________________________________________
SELECT PRICE,AVG(PRICE) as AVG_PRICE...
June 8, 2011 at 2:33 am
PC table
codemodelspeedramhdcdprice
1123250064512x600
101260500321012x350
1112339001284040x980
1212338001282050x970
211217501281440x850
3123350064512x600
411216001281440x850
51121600128840x850
612337501282050x950
71232500321012x400
8123245064824x350
91232450321024x350
June 8, 2011 at 2:24 am
Hi ,
Please help me on this:(Check my first post for the table schema)
For each value of PC speed that exceeds 600 MHz, define the average price of the PCs with...
June 8, 2011 at 2:23 am
_______________________
AVAILABLE DATA:Attached screenshot + description
______________________________________
The database scheme consists of four tables:
Product(maker, model, type)
PC(code, model, speed, ram, hd, cd, price)
Laptop(code, model, speed, ram, hd, screen, price)
Printer(code, model, color, type, price)
The table...
June 3, 2011 at 2:45 am
Sorry forgot to attach error message on sql 2005
Msg 4832, Level 16, State 1, Line 2
Bulk load: An unexpected end of file was encountered in the data file.
Msg 7399, Level...
June 3, 2011 at 12:32 am
I started first bulk insert and its not working:
CREATE TABLE PRODUCT(
MAKER VARCHAR(10) NOT NULL,
MODEL VARCHAR(50) NOT NULL PRIMARY KEY,
TYPE VARCHAR(50))
________________________
BULK
INSERT product
FROM 'c:\product.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
)
__________________
I have uploaded sheet also...
June 3, 2011 at 12:31 am
Hi LutzM,
I used the query suggested by you and error mesaage is "Column 'PRODUCT.maker' is invalid in the select list because it is not contained in either an aggregate function...
June 2, 2011 at 5:26 am
If i drop the whole constraint i will loose identity also..is there any way that will drop primary key but will keep identity constraint....
May 24, 2011 at 12:17 pm
I am doing export only for practice..and learning purpose.thanks for the help..is there any query to import?
May 21, 2011 at 2:48 pm
thanks a lot ..this example was great help...:-)
May 21, 2011 at 2:28 pm
Viewing 15 posts - 1 through 15 (of 22 total)