Click here to Skip to main content
15,916,601 members
Home / Discussions / Database
   

Database

 
Questiony this query answer wrong ? Pin
williamroma16-Dec-11 7:40
williamroma16-Dec-11 7:40 
AnswerRe: y this query answer wrong ? Pin
AmitGajjar17-Dec-11 7:53
professionalAmitGajjar17-Dec-11 7:53 
AnswerRe: y this query answer wrong ? Pin
coded00718-Dec-11 0:16
professionalcoded00718-Dec-11 0:16 
QuestionCRecorset fails to retrive fields when there is only one record in recordset. Pin
Vaclav_15-Dec-11 9:51
Vaclav_15-Dec-11 9:51 
AnswerRe: CRecorset fails to retrive fields when there is only one record in recordset. Pin
SilimSayo16-Dec-11 0:01
SilimSayo16-Dec-11 0:01 
AnswerRe: CRecorset fails to retrive fields when there is only one record in recordset. Pin
bsdtux19-Dec-11 5:39
bsdtux19-Dec-11 5:39 
GeneralRe: CRecorset fails to retrive fields when there is only one record in recordset. Pin
Vaclav_19-Dec-11 7:11
Vaclav_19-Dec-11 7:11 
QuestionStored procedures with booleans leading to different data types. Pin
D Hoffman14-Dec-11 11:33
D Hoffman14-Dec-11 11:33 
I am using Visual Studio 2010 Pro to make a report. I am working off someone else's stored procedure that I am not allowed to modify.

The problem is the stored procedure has IF statements, by way of example:

IF (criteria_1 = 'A')
BEGIN
SELECT
col_for_a_is_varchar100
FROM
some_table_1
END
IF (criteria_1 = 'B')
BEGIN
SELECT
col_for_b_is_varchar50
FROM
some_table_1
END

My problem is that in VS I have to use the name of column in the table but depending on what criteria_1 is equal to I could have a different column name: col_for_a_is_varchar100 vs. col_for_b_is_varchar50. I don't think there will be a problem with one being a VARCHAR(50) and the other a VARCHAR(100).

I have two different reports, one for when criteria_1 = 'A' and the other for when criteria_1 = 'B'. I am trying to make a report for criteria_1 = 'B' but there is no column or field named col_for_b_is_varchar50, only the col_for_a_is_varchar100. I tried putting in col_for_a_is_varchar100 where I would want col_for_b_is_varchar50 to appear in the report but that isn't working.

Have I made some mistake elsewhere because I should be able to use col_for_a_is_varchar100 even when the default value for parameter "criteria_1" is 'B'? The preview always fails to work.

If anyone could help me out it would save me from this grunt work and let me get back to coding in TeraData SQL and SAS again.
AnswerRe: Stored procedures with booleans leading to different data types. Pin
SilimSayo14-Dec-11 12:58
SilimSayo14-Dec-11 12:58 
AnswerRe: Stored procedures with booleans leading to different data types. Pin
coded00715-Dec-11 2:50
professionalcoded00715-Dec-11 2:50 
AnswerRe: Stored procedures with booleans leading to different data types. Pin
Eddy Vluggen18-Dec-11 2:28
professionalEddy Vluggen18-Dec-11 2:28 
GeneralRe: Stored procedures with booleans leading to different data types. Pin
D Hoffman17-Jan-12 1:35
D Hoffman17-Jan-12 1:35 
QuestionConverting from Access to MSDE 2000 Pin
Member 801739614-Dec-11 4:47
Member 801739614-Dec-11 4:47 
AnswerRe: Converting from Access to MSDE 2000 Pin
Corporal Agarn14-Dec-11 9:17
professionalCorporal Agarn14-Dec-11 9:17 
QuestionEquivalent in MS Sql Pin
Hum Dum13-Dec-11 22:51
Hum Dum13-Dec-11 22:51 
AnswerRe: Equivalent in MS Sql Pin
Geoff Williams14-Dec-11 0:17
Geoff Williams14-Dec-11 0:17 
AnswerRe: Equivalent in MS Sql Pin
Shameel14-Dec-11 2:28
professionalShameel14-Dec-11 2:28 
GeneralRe: Equivalent in MS Sql Pin
SilimSayo14-Dec-11 2:51
SilimSayo14-Dec-11 2:51 
GeneralRe: Equivalent in MS Sql Pin
jschell14-Dec-11 9:26
jschell14-Dec-11 9:26 
GeneralRe: Equivalent in MS Sql Pin
Shameel15-Dec-11 7:27
professionalShameel15-Dec-11 7:27 
GeneralRe: Equivalent in MS Sql Pin
SilimSayo15-Dec-11 11:00
SilimSayo15-Dec-11 11:00 
GeneralRe: Equivalent in MS Sql Pin
jschell16-Dec-11 8:34
jschell16-Dec-11 8:34 
JokeRe: Equivalent in MS Sql Pin
SilimSayo16-Dec-11 14:31
SilimSayo16-Dec-11 14:31 
GeneralRe: Equivalent in MS Sql Pin
Shameel20-Dec-11 2:51
professionalShameel20-Dec-11 2:51 
QuestionGROUP BY and listing rows in an aggrigate Pin
nallelcm13-Dec-11 5:44
nallelcm13-Dec-11 5:44 

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.