Microsoft
Software
Hardware
Network
Question : SQL update statement on sql server 2005
I need a update query to update a tables top 1 row.
Info:
1. This table is 5 columns columns, one of the column is STATUS. other is PDATE.
2. This table got 100 rows. all the rows have 'N' in the STATUS column.
3. sql where clause is based STATUS column.
4. I need some thing similar to it
update cust_table set STATUS='P' and PDATA = currentDate where STATUS='N' and (pick the top row only)
5. Every time when I run this update I want to update one row only and for that row STATUS should set to 'P' and PDATE should be todays date
6. I dont need a script or a stored proc. Need only one sql quary.
Quick help us greatly appriaciated.
Thank you
Answer : SQL update statement on sql server 2005
forget the order by, it only seems to works with SELECT TOP N
Random Solutions
Small Business Server Crital alerts
Public Desktop Icons not showing in RDP sessions
DataBinding: 'System.Data.Common.DataRe
cordIntern
al' does not contain a property with the name 'IdKeuze'.
Vbscript PDF Metadata for SharePoint 2010
Error: "The site <sitename> could not be found in the Web application SPWebApplication Name=MOSS Parent=SPWebService"
Apache2 name-based virtual host & SSL
Anomaly with MSAccess running as scheduled task calling MSProject
PL/SQL Create Global Temp Table and insert records returned from SELECT query
vb 6.0 version number
clear cut - sql express 2008 connection limit