Click here to Skip to main content
15,900,668 members
Home / Discussions / Database
   

Database

 
GeneralRe: Disconnected Data Question Pin
miah alom19-Aug-05 6:30
miah alom19-Aug-05 6:30 
QuestionSQL 2000 - IF / THEN bug? Pin
Anthony Ford17-Aug-05 5:11
Anthony Ford17-Aug-05 5:11 
AnswerRe: SQL 2000 - IF / THEN bug? Pin
ToddHileHoffer17-Aug-05 9:46
ToddHileHoffer17-Aug-05 9:46 
GeneralRe: SQL 2000 - IF / THEN bug? Pin
Anthony Ford17-Aug-05 10:02
Anthony Ford17-Aug-05 10:02 
GeneralRe: SQL 2000 - IF / THEN bug? Pin
ToddHileHoffer17-Aug-05 10:42
ToddHileHoffer17-Aug-05 10:42 
GeneralSql server Pin
chandru_inbox17-Aug-05 0:29
chandru_inbox17-Aug-05 0:29 
GeneralRe: Sql server Pin
Yulianto.18-Aug-05 16:44
Yulianto.18-Aug-05 16:44 
GeneralRe: Sql server Pin
miah alom19-Aug-05 6:34
miah alom19-Aug-05 6:34 
GeneralNeed advice on numerical data types for numbers like ##,###.## Pin
FTrader16-Aug-05 20:41
FTrader16-Aug-05 20:41 
GeneralRe: Need advice on numerical data types for numbers like ##,###.## Pin
Colin Angus Mackay16-Aug-05 22:28
Colin Angus Mackay16-Aug-05 22:28 
GeneralRe: Need advice on numerical data types for numbers like ##,###.## Pin
FTrader16-Aug-05 23:16
FTrader16-Aug-05 23:16 
GeneralRe: Need advice on numerical data types for numbers like ##,###.## Pin
Dan Neely17-Aug-05 10:38
Dan Neely17-Aug-05 10:38 
GeneralRe: Need advice on numerical data types for numbers like ##,###.## Pin
FTrader17-Aug-05 12:44
FTrader17-Aug-05 12:44 
GeneralRe: Need advice on numerical data types for numbers like ##,###.## Pin
Dan Neely18-Aug-05 7:57
Dan Neely18-Aug-05 7:57 
GeneralSome info about .NET decimal Pin
FTrader17-Aug-05 1:57
FTrader17-Aug-05 1:57 
QuestionDeleted entries reappearing in Access 2000 DB? Pin
mav.northwind16-Aug-05 20:28
mav.northwind16-Aug-05 20:28 
Questionhow to accessing Paradox use ADO Pin
ebinaini16-Aug-05 19:20
ebinaini16-Aug-05 19:20 
General.NET SQL Stored Procedures Pin
Carl Mercier16-Aug-05 6:36
Carl Mercier16-Aug-05 6:36 
GeneralTriggers Problem [modified] Pin
Faheem Habib15-Aug-05 23:23
Faheem Habib15-Aug-05 23:23 
GeneralRe: Triggers Problem Pin
ToddHileHoffer16-Aug-05 10:23
ToddHileHoffer16-Aug-05 10:23 
Generalneed help about analysis service connection Pin
ianpeter15-Aug-05 21:25
ianpeter15-Aug-05 21:25 
Generalanwhat's wrong with my cursor!!!!!!!!! Pin
under281115-Aug-05 21:11
under281115-Aug-05 21:11 
Sigh | :sigh: Hello
I have empt table where job_id is field in it.
I want to update empt table if job_id = '1' or '3' by '999'
And if job_id not '1' or '3' then update by '456'
So what's wrong with my cursor

T.I.A
Shashank
-----------------------------------------------------

CREATE procedure lnt.textt
@qurstr varchar(10)

AS
Declare @in AS Varchar(10)

Declare crs_cc cursor for select job_id from empt FOR UPDATE OF job_id

open crs_cc

fetch next from crs_cc INTO @in

while @@fetch_status = 0

IF @qurstr = '1' OR @qurstr = '3'
BEGIN
UPDATE empt set job_id = '999'
where job_id = @qurstr
print 'U Miss By Miles!!!!'
print @qurstr
END

IF @qurstr IN (SELECT job_id from empt where job_id not in ('1','3'))
BEGIN
update empt set job_id = '456'
where job_id = @qurstr
print ' Success'
END

FETCH NEXT FROM crs_cc

CLOSE crs_cc

DEALLOCATE crs_cc

GO
GeneralRe: anwhat's wrong with my cursor!!!!!!!!! Pin
Colin Angus Mackay15-Aug-05 22:11
Colin Angus Mackay15-Aug-05 22:11 
QuestionHow does .NET Data Provider for SQL Server convert varchar data to Unicode? Pin
GlennBits15-Aug-05 6:46
GlennBits15-Aug-05 6:46 
GeneralSQL Problem Pin
WDI15-Aug-05 3:39
WDI15-Aug-05 3:39 

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.