Click here to Skip to main content
15,867,308 members
Home / Discussions / Database
   

Database

 
Question.sql file Pin
palakash2-Dec-11 21:04
palakash2-Dec-11 21:04 
AnswerRe: .sql file Pin
R. Giskard Reventlov3-Dec-11 2:57
R. Giskard Reventlov3-Dec-11 2:57 
QuestionSql Server 2008R2 Developers version Pin
SQL Ed2-Dec-11 8:40
SQL Ed2-Dec-11 8:40 
AnswerRe: Sql Server 2008R2 Developers version Pin
Mycroft Holmes2-Dec-11 12:19
professionalMycroft Holmes2-Dec-11 12:19 
AnswerRe: Sql Server 2008R2 Developers version Pin
Wonde Tadesse2-Dec-11 16:46
professionalWonde Tadesse2-Dec-11 16:46 
QuestionSolved:Update Multiple Rows of one table on the base of multiple rows in another table Pin
Rupesh Kumar Swami2-Dec-11 0:26
Rupesh Kumar Swami2-Dec-11 0:26 
AnswerRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Varsha Ramnani2-Dec-11 0:44
professionalVarsha Ramnani2-Dec-11 0:44 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Rupesh Kumar Swami2-Dec-11 2:51
Rupesh Kumar Swami2-Dec-11 2:51 
Hi Varsha,
i tried as following

SQL
UPDATE LatestPrice SET price = LatestPricesFromHistory.price,
FROM ( SELECT *
FROM history
WHERE Date1 = (
SELECT max( Date1 )
FROM history ) ) AS LatestPricesFromHistory
WHERE LatestPrice.Sid = LatestPricesFromHistory.SId and LatestPrice.Country = LatestPricesFromHistory.Country


but it give me following error

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'From { select * from history where Date1=(select max(Date1) from history' at line 1.

Please suggest
rup28aug@yahoo.co.in
Rupesh Kumar Swami
Software Developer,
Integrated Solution,
Bikaner (India)

Company - ISOL, India


Award: Best VB.NET article of June 2008: Create Column Charts Using OWC11

GeneralRe: Update Multiple Rows of one tableon the base of multiple rows in another table Pin
Varsha Ramnani2-Dec-11 4:20
professionalVarsha Ramnani2-Dec-11 4:20 
GeneralRe: Update Multiple Rows of one tableon the base of multiple rows in another table Pin
Rupesh Kumar Swami2-Dec-11 20:35
Rupesh Kumar Swami2-Dec-11 20:35 
GeneralRe: Update Multiple Rows of one tableon the base of multiple rows in another table Pin
Varsha Ramnani2-Dec-11 23:34
professionalVarsha Ramnani2-Dec-11 23:34 
GeneralRe: Update Multiple Rows of one tableon the base of multiple rows in another table Pin
Rupesh Kumar Swami3-Dec-11 0:52
Rupesh Kumar Swami3-Dec-11 0:52 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Eddy Vluggen3-Dec-11 4:26
professionalEddy Vluggen3-Dec-11 4:26 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Varsha Ramnani4-Dec-11 17:15
professionalVarsha Ramnani4-Dec-11 17:15 
AnswerRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Jörgen Andersson2-Dec-11 3:59
professionalJörgen Andersson2-Dec-11 3:59 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Rupesh Kumar Swami2-Dec-11 20:42
Rupesh Kumar Swami2-Dec-11 20:42 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Jörgen Andersson2-Dec-11 22:45
professionalJörgen Andersson2-Dec-11 22:45 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Rupesh Kumar Swami2-Dec-11 23:32
Rupesh Kumar Swami2-Dec-11 23:32 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Jörgen Andersson3-Dec-11 3:32
professionalJörgen Andersson3-Dec-11 3:32 
GeneralRe: Update Multiple Rows of one table on the base of multiple rows in another table Pin
Rupesh Kumar Swami3-Dec-11 1:18
Rupesh Kumar Swami3-Dec-11 1:18 
QuestionSqlserver Pin
infobeena1-Dec-11 22:28
infobeena1-Dec-11 22:28 
AnswerRe: Sqlserver Pin
infobeena1-Dec-11 22:33
infobeena1-Dec-11 22:33 
GeneralRe: Sqlserver Pin
jschell2-Dec-11 8:49
jschell2-Dec-11 8:49 
AnswerRe: Sqlserver Pin
thatraja1-Dec-11 22:41
professionalthatraja1-Dec-11 22:41 
JokeRe: Sqlserver Pin
Eddy Vluggen2-Dec-11 7:31
professionalEddy Vluggen2-Dec-11 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.