Dear Arun Since the employees table does not seem to have something unique to tell one row apart from another, you cannot uniquely delete one row and not the...
4480
Noman Aftab
noman17pk
Mar 24, 2010 8:05 pm
Hi, I have a table MARKET_PRICES with columns: SYMBOL, PRICE_DATE and PRICE. There may be days on which the prices don't get upload, simply because they havn't...
4481
John Warner
john@...
Mar 24, 2010 10:09 pm
You will at least need a table with all dates in one of the columns otherwise there is no way to even show zero for the missing dates. Then you do an outer...
4482
Paul Livengood
p_livengood
Mar 25, 2010 1:31 am
There are many different ways to do this and the correct would to use is based on your business requirements (speed, how often used, how much data to return,...
4483
John Warner
john@...
Mar 25, 2010 9:41 am
Paul the list software screwed up your post so that it is extremely difficult to read. If it isn't too much trouble (and you still have the original in your...
4484
Noman Aftab
noman17pk
Mar 25, 2010 12:02 pm
Yeah, I also tried to make it run-able but was unable to do so. Best Wishes, Noman Aftab ________________________________ From: John Warner <john@...> ...
4485
p_livengood
Mar 25, 2010 2:25 pm
sorry about that....is this better? ... --this is to recreate your table DECLARE @MARKET_PRICES TABLE ( PRICE_DATE DATETIME, PRICE NUMERIC(18,2)); INSERT...
4486
John Warner
john@...
Mar 25, 2010 2:50 pm
Much, THANK YOU! John Warner ... is all ... difficult to ... your sent ... use is ... to ... written ... sub-queries, ... will run ... with ... AS(SELECT1 ... ...
4487
Noman Aftab
noman17pk
Mar 25, 2010 4:09 pm
Thanks matey! Best Wishes, Noman Aftab http://www.corpus.quran.com/wordbyword.jsp http://www.jalandhari.qsh.eu ________________________________ From:...
4488
Noman Aftab
noman17pk
Mar 27, 2010 9:41 am
Hi Paul, Here is one solution which I got from another source; the difference being the CTE structure. DECLARE @MARKET_PRICES TABLE ( PRICE_DATE DATETIME, ...
4489
John Warner
john@...
Mar 27, 2010 10:41 am
Cool! Of course Paul's 'book was about SQL Server 2000 and yours 2005 +. I think I like the CTE better. John Warner...
4490
CharlesMarkCarroll
charlesmarkc...
Apr 3, 2010 12:01 am
From: "lv_solutions" <lvs.mail@...> Date: Fri Apr 2, 2010 3:29 pm Subject: BEGINNER NEEDS HELP Need help please with following Query Table 1 Holds user...
4491
charlesmarkcarroll
charlesmarkc...
Apr 3, 2010 12:01 am
From: "lv_solutions" <lvs.mail@...> Date: Fri Apr 2, 2010 3:29 pm Subject: BEGINNER NEEDS HELP Need help please with following Query Table 1 Holds user...
4492
John Warner
john@...
Apr 3, 2010 2:54 pm
If you add a camera it logically would not show up in a list of users and view permissions as you have not assigned a user nor permission to the camera. To...
4493
John Warner
john@...
Apr 5, 2010 7:04 pm
SQL Server 2005 Express I need to UPDATE 3 fields in a table let's call it Master. The data is gotten from a SELECT which fetches all 3 of the needed fields ...
4494
Tim Mitchell
tdmitch
Apr 5, 2010 7:14 pm
John, You can't do an UPDATE... SELECT, but you can do an UPDATE with an INNER JOIN to get the desired result. Something like the following should work: ...
4495
Noman Aftab
noman17pk
Apr 5, 2010 7:22 pm
UPDATE MASTER SET FIELD1 = SEL.FIELD1, FIELD2 = SEL.FIELD2, FIELD3 = SEL.FIELD3 FROM MASTER INNER JOIN SEL ON SEL.PRIMARY_KEY = MASTER.PRIMARY_KEY you can...
4496
John Warner
john@...
Apr 5, 2010 9:27 pm
Thanks I can't play with it right now but that looks likely to be my solution. John Warner ... fields ... hope ... put ... really ... bit...
4497
John Warner
john@...
Apr 5, 2010 9:28 pm
Thanks I think you may have come real close to actually writing the query. Can't play with it right now, but you'll see me holler tomorrow if this fails (might...
4498
lv_solutions
Apr 6, 2010 2:07 pm
It seems as though you fully understand my issue, and thanks for the reply. I left off the where, I tried both LEFT and RIGHT but the newly added cameras that...
4499
John Warner
john@...
Apr 6, 2010 2:16 pm
Try replacing: p.CameraID with c.CameraID Question when you add a camera, what table(s) are you adding it to since 4 has the name and 3 appears to be the...
4500
John Warner
john@...
Apr 6, 2010 4:36 pm
First thanks again to all for the suggestions on the UPDATE query yesterday. Works like a charm. But another small problem has popped up and I think this is in...
4501
Arnie Rowland
arnie1568
Apr 6, 2010 5:27 pm
Use the REPLACE() function, replacing ' & ' with ' & ' (Note the spaces before and after.) Perhaps something like: SELECT replace(' & ', (SELECT...
4502
John Warner
john@...
Apr 6, 2010 6:25 pm
Thanks Arnie, that wasn't quite it but put me onto the proper trail. I didn't think we could do this with the 'nesting39; involved in my query. Oh just so you...
4503
hansve2000
Apr 12, 2010 2:58 pm
If using SQL Server 2005 or later: WITH cte AS (SELECT ROW_NUMBER OVER(PARTITION BY Col1, Col2, Col3 ORDER BY Col1) AS rw FROM dbo.Employees) DELETE FROM cte ...
4504
J P
pulverizers73
Apr 15, 2010 4:38 pm
I have a table with three columns Month (values JAN,FEB,MAR,APR) etc Monthno (values 1-12) Year 2009,2010, etc How do I take the above fields and create a...
4505
Arnie Rowland
arnie1568
Apr 15, 2010 4:58 pm
Something like this could work: cast(( cast( [MonthNo] as varchar(2)) + '/01/' + cast( [Year] as varchar(4))) as date ) the 'date' datatype is new with SQL...
4506
lvs mail
lv_solutions
Apr 15, 2010 5:01 pm
That does not work either. I get a multitude of Same# UserID with Each Carera =ID Sincerely Trevor Cell: (407)467-5435 ________________________________ From:...
4507
abhijit kakade
abhijitkakad...
Apr 15, 2010 5:01 pm
HI , JHON Â Â select convert(varchar, '1' + space(2) + [MONTH] + space(2) + [year], 102) from datetable Try this , this will be usefull. and let me know in...
4508
J P
pulverizers73
Apr 15, 2010 5:02 pm
that got it, thanks Arnie. 2005 version here, so I used datetime. ________________________________ From: Arnie Rowland <arnie@...> To:...