Click here to Skip to main content
15,905,776 members
Home / Discussions / Database
   

Database

 
Questionconnect to MYSQL database located on web Pin
Rupesh Kumar Swami25-Aug-07 23:19
Rupesh Kumar Swami25-Aug-07 23:19 
QuestionHow to drop builtin\administrators account from sql server Pin
Developer61125-Aug-07 22:39
Developer61125-Aug-07 22:39 
AnswerRe: How to drop builtin\administrators account from sql server Pin
Mark Churchill26-Aug-07 18:07
Mark Churchill26-Aug-07 18:07 
GeneralRe: How to drop builtin\administrators account from sql server Pin
Developer61126-Aug-07 19:35
Developer61126-Aug-07 19:35 
GeneralRe: How to drop builtin\administrators account from sql server Pin
Burnsys229-Aug-07 4:35
Burnsys229-Aug-07 4:35 
Questionoutput to struct Pin
ginjikun25-Aug-07 6:53
ginjikun25-Aug-07 6:53 
AnswerRe: output to struct Pin
Christian Graus26-Aug-07 0:30
protectorChristian Graus26-Aug-07 0:30 
QuestionProblem with piece of code Pin
ChrisFarrugia25-Aug-07 6:12
ChrisFarrugia25-Aug-07 6:12 
I have this stored procedure on which I would like to apply if statements at the where clause. But it seems that sql is finding errors associated with the if statements. Can anyone please guide me on what is wrong. Maybe it is not possible to use if statemnts in where clauses?

@category int,@brand int ---> parameters
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

select equipment_id,equipment_modelNumber,equipment_description,category,brand,link,equipment_small_image,equipment_largr_image
FROM Gen_Equipment
INNER JOIN Gen_Equipment_Categories
INNER JOIN Gen_Equipment_Brand
INNER JOIN Gen_Equipment_Link
ON (Gen_Equipment.equipment_category=Gen_Equipment_Categories.category_id)
ON (Gen_Equipment.equipment_brand=Gen_Equipment_Brand.brand)
ON (Gen_Equipment.equipment_link=Gen_Equipment_Link.link_id)
WHERE
if (NOT(@category=0) AND @brand=0) THEN
BEGIN
Gen_Equipment.equipment_category=@category order by Gen_Equipment.equipment_category
END

ELSE IF (@category=0 AND NOT(@brand=0)) THEN
BEGIN
equipment_brand=@brand
END


END

Thank you very much for your help.

Chris
AnswerRe: Problem with piece of code Pin
Colin Angus Mackay25-Aug-07 6:51
Colin Angus Mackay25-Aug-07 6:51 
QuestionAlternate of listbox.itemdata property Pin
RaveRare24-Aug-07 23:51
RaveRare24-Aug-07 23:51 
GeneralRe: Alternate of listbox.itemdata property Pin
John-ph25-Aug-07 0:41
John-ph25-Aug-07 0:41 
AnswerRe: Alternate of listbox.itemdata property Pin
Rupesh Kumar Swami25-Aug-07 23:38
Rupesh Kumar Swami25-Aug-07 23:38 
QuestionBest practices to save, edit, insert, view records on a Complex form vb.net Pin
RaveRare24-Aug-07 22:09
RaveRare24-Aug-07 22:09 
AnswerRe: Best practices to save, edit, insert, view records on a Complex form vb.net Pin
Christian Graus24-Aug-07 22:49
protectorChristian Graus24-Aug-07 22:49 
GeneralRe: Best practices to save, edit, insert, view records on a Complex form vb.net Pin
RaveRare24-Aug-07 22:53
RaveRare24-Aug-07 22:53 
GeneralRe: Best practices to save, edit, insert, view records on a Complex form vb.net Pin
Christian Graus25-Aug-07 0:43
protectorChristian Graus25-Aug-07 0:43 
GeneralRe: Best practices to save, edit, insert, view records on a Complex form vb.net Pin
Widgets26-Aug-07 17:30
Widgets26-Aug-07 17:30 
Questionencrypt password and user name Pin
prasadbuddhika24-Aug-07 18:52
prasadbuddhika24-Aug-07 18:52 
AnswerRe: encrypt password and user name Pin
Rami Said Abd Alhalim25-Aug-07 2:49
Rami Said Abd Alhalim25-Aug-07 2:49 
QuestionAuto generate field value.., Pin
HemMagesh24-Aug-07 18:06
HemMagesh24-Aug-07 18:06 
AnswerRe: Auto generate field value.., Pin
Christian Graus24-Aug-07 18:23
protectorChristian Graus24-Aug-07 18:23 
AnswerRe: Auto generate field value.., Pin
Senu Gandhi24-Aug-07 22:47
Senu Gandhi24-Aug-07 22:47 
Questiontrigger to client Pin
pian_christian24-Aug-07 16:55
pian_christian24-Aug-07 16:55 
AnswerRe: trigger to client Pin
Christian Graus24-Aug-07 18:22
protectorChristian Graus24-Aug-07 18:22 
AnswerRe: trigger to client Pin
Rami Said Abd Alhalim25-Aug-07 2:52
Rami Said Abd Alhalim25-Aug-07 2:52 

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.