Click here to Skip to main content
15,898,538 members
Home / Discussions / Database
   

Database

 
QuestionHow to install dao db app? Pin
includeh1024-Jul-08 15:17
includeh1024-Jul-08 15:17 
AnswerRe: How to install dao db app? Pin
Wendelius24-Jul-08 18:35
mentorWendelius24-Jul-08 18:35 
AnswerRe: How to install dao db app? Pin
Mycroft Holmes25-Jul-08 23:19
professionalMycroft Holmes25-Jul-08 23:19 
QuestionSimple Database Connectivity!!!! Pin
vamseeraja24-Jul-08 5:40
vamseeraja24-Jul-08 5:40 
AnswerRe: Simple Database Connectivity!!!! Pin
Vimalsoft(Pty) Ltd24-Jul-08 8:14
professionalVimalsoft(Pty) Ltd24-Jul-08 8:14 
GeneralRe: Simple Database Connectivity!!!! Pin
vamseeraja25-Jul-08 4:22
vamseeraja25-Jul-08 4:22 
GeneralRe: Simple Database Connectivity!!!! Pin
Vimalsoft(Pty) Ltd25-Jul-08 6:04
professionalVimalsoft(Pty) Ltd25-Jul-08 6:04 
JokeRe: Simple Database Connectivity!!!! Pin
nelsonpaixao24-Jul-08 12:48
nelsonpaixao24-Jul-08 12:48 
GeneralRe: Simple Database Connectivity!!!! Pin
vamseeraja25-Jul-08 4:53
vamseeraja25-Jul-08 4:53 
QuestionSelect Into Statement Clarity Pin
Vimalsoft(Pty) Ltd24-Jul-08 5:31
professionalVimalsoft(Pty) Ltd24-Jul-08 5:31 
AnswerRe: Select Into Statement Clarity Pin
Tim Carmichael24-Jul-08 5:44
Tim Carmichael24-Jul-08 5:44 
GeneralRe: Select Into Statement Clarity Pin
Vimalsoft(Pty) Ltd24-Jul-08 8:06
professionalVimalsoft(Pty) Ltd24-Jul-08 8:06 
AnswerRe: Select Into Statement Clarity Pin
TheFM23424-Jul-08 8:30
TheFM23424-Jul-08 8:30 
GeneralRe: Select Into Statement Clarity Pin
Vimalsoft(Pty) Ltd24-Jul-08 8:34
professionalVimalsoft(Pty) Ltd24-Jul-08 8:34 
GeneralRe: Select Into Statement Clarity Pin
Ashfield25-Jul-08 9:24
Ashfield25-Jul-08 9:24 
QuestionMultiple databases from a master database Pin
Brendan Vogt24-Jul-08 1:18
Brendan Vogt24-Jul-08 1:18 
AnswerRe: Multiple databases from a master database Pin
TheFM23424-Jul-08 3:31
TheFM23424-Jul-08 3:31 
GeneralRe: Multiple databases from a master database Pin
Brendan Vogt24-Jul-08 5:37
Brendan Vogt24-Jul-08 5:37 
JokeRe: Multiple databases from a master database Pin
SimulationofSai24-Jul-08 12:37
SimulationofSai24-Jul-08 12:37 
Questionacess database and bind to the datagrid using c# in ado.net Pin
swapnamoturu23-Jul-08 20:50
swapnamoturu23-Jul-08 20:50 
AnswerRe: acess database and bind to the datagrid using c# in ado.net Pin
Vimalsoft(Pty) Ltd23-Jul-08 23:37
professionalVimalsoft(Pty) Ltd23-Jul-08 23:37 
Question"loop" this for me please Pin
nelsonpaixao23-Jul-08 13:40
nelsonpaixao23-Jul-08 13:40 
Hi,

the code bellow works just fine but as you can see it´s a mess.
I don´t like to code "or" so many times.
I know the syntax in c# for array and loops but i can´t find anything of that in sql server.
I am thinking of looping it or make an array but...Unsure | :~

declare @racer1 as varchar(50)
declare @racer2 as varchar(50)
declare @racer3 as varchar(50)
declare @racer4 as varchar(50)
declare @racer5 as varchar(50)
declare @racer6 as varchar(50)
declare @racer7 as varchar(50)
declare @racer8 as varchar(50)

set @racer1 = 'Piquet'
set @racer2 = 'Alonso'
set @racer3 = 'Massa'
set @racer4 = 'Heidfeld'
set @racer5 = 'Hamilton'
set @racer6 = 'Kovalainen'
set @racer7 = 'Raikonen'
set @racer8 = 'Trulli'

if @racer1 = @racer2 or @racer1 = @racer3 or @racer1 = @racer4
or @racer1 = @racer5 or @racer1 = @racer6 or @racer1 = @racer7
or @racer1 = @racer8 or @racer2 = @racer3 or @racer2 = @racer4
or @racer2 = @racer5 or @racer2 = @racer6 or @racer2 = @racer7
or @racer2 = @racer8 or @racer3 = @racer4 or @racer3 = @racer5
or @racer3 = @racer6 or @racer3 = @racer7 or @racer3 = @racer8
or @racer4 = @racer5 or @racer4 = @racer6 or @racer4 = @racer7
or @racer4 = @racer8 or @racer5 = @racer6 or @racer5 = @racer7
or @racer5 = @racer8 or @racer6 = @racer7 or @racer6 = @racer8
or @racer7 = @racer8

begin

declare @msgError as varchar(50)
set @msgError = 'Error: Same racer name'
select @msgError

end

else

begin

declare @msgOK as varchar(50)
set @msgOK = 'OK: Diferent racer'
select @msgOK

end

What do you think? D'Oh! | :doh:
thanks Laugh | :laugh:
AnswerRe: "loop" this for me please Pin
Mycroft Holmes23-Jul-08 20:29
professionalMycroft Holmes23-Jul-08 20:29 
AnswerRe: "loop" this for me please Pin
BadhShah24-Jul-08 2:45
BadhShah24-Jul-08 2:45 
GeneralRe: "loop" this for me please Pin
nelsonpaixao24-Jul-08 12:10
nelsonpaixao24-Jul-08 12:10 

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.