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

Database

 
GeneralRe: Creating tables\database design Pin
TheJudeDude9-Feb-06 9:12
TheJudeDude9-Feb-06 9:12 
QuestionDifference between two tables!!! Pin
Small Rat8-Feb-06 6:22
Small Rat8-Feb-06 6:22 
AnswerRe: Difference between two tables!!! Pin
Chris Meech8-Feb-06 6:29
Chris Meech8-Feb-06 6:29 
QuestionCannot access Database Diagrams after disconnecting from Network Domain? Pin
Rashar8-Feb-06 5:55
Rashar8-Feb-06 5:55 
QuestionHow to Retrive day of a date Pin
luckyv8-Feb-06 0:14
luckyv8-Feb-06 0:14 
AnswerRe: How to Retrive day of a date Pin
dansoft8-Feb-06 2:59
dansoft8-Feb-06 2:59 
AnswerRe: How to Retrive day of a date Pin
Luis Alonso Ramos8-Feb-06 17:53
Luis Alonso Ramos8-Feb-06 17:53 
QuestionUsing a varible in select clause Pin
awisey7-Feb-06 23:19
awisey7-Feb-06 23:19 
Hi all,

im having problems using a alias name to perform calculations in the select clause. My code is as follows:

SELECT<br />
<br />
CASE WHEN STK_SORT_KEY2 = 'TREND' THEN ([OD_UNITCST] * (1 - ISNULL(dbo.TrendDiscount.Discount, '0.32'))) ELSE 0 END as Expr2, <br />
                      [Expr2] / [OD_UNITCST] AS Expr11<br />
<br />
FROM...<br />


My question is how do use a field to store calculations which i can reference later in the select clause. I keep getting a Invalid name 'Expr2' error



Any ideas?
Thanks in advance,
AnswerRe: Using a varible in select clause Pin
Mike Ellison8-Feb-06 6:21
Mike Ellison8-Feb-06 6:21 
QuestionOleDbDataReader Pin
myNameIsRon7-Feb-06 21:51
myNameIsRon7-Feb-06 21:51 
AnswerRe: OleDbDataReader Pin
VMSSanthosh7-Feb-06 23:08
VMSSanthosh7-Feb-06 23:08 
GeneralRe: OleDbDataReader Pin
myNameIsRon8-Feb-06 15:17
myNameIsRon8-Feb-06 15:17 
QuestionSynchronization of DB tables? Pin
kbalias7-Feb-06 19:19
kbalias7-Feb-06 19:19 
AnswerRe: Synchronization of DB tables? Pin
Mike Ellison8-Feb-06 6:18
Mike Ellison8-Feb-06 6:18 
Questiondatabase error Pin
dev dhoundiyal7-Feb-06 18:53
dev dhoundiyal7-Feb-06 18:53 
QuestionConnecting to an Oracle Server DB? Pin
cbhkenshin7-Feb-06 18:51
cbhkenshin7-Feb-06 18:51 
AnswerRe: Connecting to an Oracle Server DB? Pin
Mike Ellison8-Feb-06 6:14
Mike Ellison8-Feb-06 6:14 
QuestionText File Pin
sood_is_in7-Feb-06 17:53
sood_is_in7-Feb-06 17:53 
AnswerRe: Text File Pin
VMSSanthosh7-Feb-06 23:43
VMSSanthosh7-Feb-06 23:43 
AnswerRe: Text File Pin
Dave Kreskowiak8-Feb-06 2:09
mveDave Kreskowiak8-Feb-06 2:09 
Questionnot able to connect with sql server2000 Pin
nauty7-Feb-06 9:12
nauty7-Feb-06 9:12 
AnswerRe: not able to connect with sql server2000 Pin
Mekong River7-Feb-06 15:20
Mekong River7-Feb-06 15:20 
GeneralRe: not able to connect with sql server2000 Pin
Dave Kreskowiak7-Feb-06 16:05
mveDave Kreskowiak7-Feb-06 16:05 
GeneralRe: not able to connect with sql server2000 Pin
Mekong River7-Feb-06 16:15
Mekong River7-Feb-06 16:15 
GeneralRe: not able to connect with sql server2000 Pin
Dave Kreskowiak7-Feb-06 16:24
mveDave Kreskowiak7-Feb-06 16:24 

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.