Click here to Skip to main content
15,922,015 members
Home / Discussions / Database
   

Database

 
GeneralRe: Crystal Report Pin
John_Adams8-Feb-08 1:09
John_Adams8-Feb-08 1:09 
GeneralRe: Crystal Report Pin
techpub8-Feb-08 3:26
techpub8-Feb-08 3:26 
Generalmail send using sqlserver2000 Pin
Member 38798817-Feb-08 18:16
Member 38798817-Feb-08 18:16 
GeneralRe: mail send using sqlserver2000 Pin
That's Aragon7-Feb-08 18:43
That's Aragon7-Feb-08 18:43 
GeneralORDER BY Pin
uglyeyes7-Feb-08 13:14
uglyeyes7-Feb-08 13:14 
GeneralRe: ORDER BY Pin
pmarfleet7-Feb-08 21:33
pmarfleet7-Feb-08 21:33 
GeneralRe: ORDER BY Pin
Krish - KP7-Feb-08 21:37
Krish - KP7-Feb-08 21:37 
QuestionHow to insert a data after upading the table Pin
Exelioindia7-Feb-08 9:45
Exelioindia7-Feb-08 9:45 
Hi,

I am having problem. I want to sql query to insert a row, but before that i want update in the same table with a condition.

for eg: i am having a table, in that there is a field named default. this default value must true for only one row based on the foreign key. whn i insert a row for tht foreign key, before insert it should check is the default value is true before for that foreign key. if yes then i have to reset that old default value to false and set the new one to true.

id name isdefault fkey
1 aaa true 12
2 aas false 12
3 aer false 12
4 sdf true 17
5 ter false 32
6 zxc false 32

in the above example if i enter row for fkey 12, then the query should reset the previous all default value to false and then inset the new value to true(if the new row have true value) value to new row.

if there is no default true value thn it shold enter the true value to new row.

any one please suggest me a query.

thanks in advance.

Know is Drop, Unknown is Ocean

AnswerRe: How to insert a data after upading the table Pin
pmarfleet7-Feb-08 10:36
pmarfleet7-Feb-08 10:36 
Generalneed help Pin
haseeb_saeed7-Feb-08 9:13
haseeb_saeed7-Feb-08 9:13 
GeneralRe: need help Pin
AlbertEiki7-Feb-08 9:43
AlbertEiki7-Feb-08 9:43 
Generalneed help Pin
haseeb_saeed7-Feb-08 9:09
haseeb_saeed7-Feb-08 9:09 
GeneralRe: need help Pin
AlbertEiki7-Feb-08 9:39
AlbertEiki7-Feb-08 9:39 
Generalretreiving n to m rows from SQL Server 2005 database. Pin
Rocky#7-Feb-08 5:24
Rocky#7-Feb-08 5:24 
GeneralRe: retreiving n to m rows from SQL Server 2005 database. [modified] Pin
AlbertEiki7-Feb-08 6:03
AlbertEiki7-Feb-08 6:03 
QuestionHow to make datatable.select() and dataview.rowfilter accent-insensitive? Pin
AlbertEiki7-Feb-08 4:41
AlbertEiki7-Feb-08 4:41 
GeneralSQL statement help Pin
munklefish7-Feb-08 4:27
munklefish7-Feb-08 4:27 
AnswerRe: SQL statement help Pin
AlbertEiki7-Feb-08 4:48
AlbertEiki7-Feb-08 4:48 
GeneralRe: SQL statement help Pin
munklefish7-Feb-08 5:02
munklefish7-Feb-08 5:02 
GeneralRe: SQL statement help Pin
AlbertEiki7-Feb-08 5:07
AlbertEiki7-Feb-08 5:07 
GeneralNeed some Ideas Pin
_anil_7-Feb-08 1:13
_anil_7-Feb-08 1:13 
QuestionRe: Need some Ideas Pin
pmarfleet7-Feb-08 2:36
pmarfleet7-Feb-08 2:36 
GeneralRemote connection to sql server Pin
eyeseetee7-Feb-08 0:04
eyeseetee7-Feb-08 0:04 
GeneralRe: Remote connection to sql server Pin
Giorgi Dalakishvili7-Feb-08 0:12
mentorGiorgi Dalakishvili7-Feb-08 0:12 
GeneralRe: Remote connection to sql server Pin
eyeseetee7-Feb-08 0:30
eyeseetee7-Feb-08 0:30 

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.