Click here to Skip to main content
15,891,567 members
Home / Discussions / Database
   

Database

 
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 
GeneralRe: SQL Problem Pin
Colin Angus Mackay15-Aug-05 5:01
Colin Angus Mackay15-Aug-05 5:01 
GeneralSQL Error Handling... Pin
Illegal Operation15-Aug-05 0:51
Illegal Operation15-Aug-05 0:51 
GeneralRe: SQL Error Handling... Pin
Vasudevan Deepak Kumar15-Aug-05 0:54
Vasudevan Deepak Kumar15-Aug-05 0:54 
GeneralRe: SQL Error Handling... Pin
Illegal Operation15-Aug-05 20:31
Illegal Operation15-Aug-05 20:31 
GeneralRe: SQL Error Handling... Pin
ToddHileHoffer16-Aug-05 10:26
ToddHileHoffer16-Aug-05 10:26 
Generalprimary key performance Pin
ppp00114-Aug-05 20:33
ppp00114-Aug-05 20:33 
GeneralRe: primary key performance Pin
Colin Angus Mackay14-Aug-05 23:09
Colin Angus Mackay14-Aug-05 23:09 
GeneralRe: primary key performance Pin
ppp00114-Aug-05 23:29
ppp00114-Aug-05 23:29 
GeneralRe: primary key performance Pin
Colin Angus Mackay14-Aug-05 23:39
Colin Angus Mackay14-Aug-05 23:39 
Generalno item error Pin
Anonymous13-Aug-05 23:37
Anonymous13-Aug-05 23:37 
GeneralClosing a connection opened by ADODC Pin
Maitre Capelo13-Aug-05 2:14
Maitre Capelo13-Aug-05 2:14 
Generalado.net and sql Pin
Micu Valentin12-Aug-05 10:54
Micu Valentin12-Aug-05 10:54 
GeneralRe: ado.net and sql Pin
Colin Angus Mackay14-Aug-05 23:10
Colin Angus Mackay14-Aug-05 23:10 
GeneralRe: ado.net and sql Pin
Micu Valentin14-Aug-05 23:25
Micu Valentin14-Aug-05 23:25 

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.