User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 374,580 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,426 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 4872 | Replies: 2
Reply
Join Date: Mar 2005
Posts: 1
Reputation: milman is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
milman milman is offline Offline
Newbie Poster

Getting current value in Select Statement

  #1  
Mar 31st, 2005
Is there a way to get the current value in the process of a select statement?

Such as

SELECT pk_ID, columnN
and be able to evaluate what pk_ID is at this point
WHERE This = That
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Location: Springfield, Oregon
Posts: 119
Reputation: Drew is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 6
Drew's Avatar
Drew Drew is offline Offline
Junior Poster

Re: Getting current value in Select Statement

  #2  
Apr 9th, 2005
What is it that you are trying to do? :s
Drew Gauderman
ASP / MSSQL Coder
http://www.iportalx.net - My ASP Portal
Reply With Quote  
Join Date: Apr 2005
Posts: 3
Reputation: gminhas is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gminhas gminhas is offline Offline
Newbie Poster

Re: Getting current value in Select Statement

  #3  
Apr 12th, 2005
yes u can..

SELECT pk_ID, columnN,(case when columnM is '1' then TableName.pk_ID else '0' end) as columnM from TableName
WHERE This = That

This is just an example..wat u can do is use the TableName.ColumnName anywhere..

if any more issues..get back to me..
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 6:29 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC