Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hspatil31
Posting Yak Master
182 Posts |
Posted - 2009-08-11 : 08:35:07
|
| Dear All,I am haveing following queary and output. Now in that queary can i give any outside parameter after that i will get Output2. I tried select empno*2 from employee for that. But in that i want to give parameter that parameter will multiply this empno. And that parameter not related with table means that is outside parameter for only multiplication.select empno from employeeOutput1 :1 2 3 4 5 Output2:246810thnks Harish Patil |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-08-11 : 08:37:02
|
| declare @value intselect @value = 2select empno * @value as empno from employeeif ur creating a sp then add input parameter as @value |
 |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-08-11 : 08:37:47
|
| select empno,empno+empno from urtable |
 |
|
|
hspatil31
Posting Yak Master
182 Posts |
Posted - 2009-08-13 : 02:27:11
|
| Hi,You told me create parameter and geives the default parameter as 2.But i want this in Crystal Report. So this parameter is not related to any table.My Queary is,So in that insted of default value how to give the parameter.select ot.Code,i1.Code,om.ItemName,i1.Quantity*(50) as Quantity, om.InvntryUOM From OITT As otLeft Join ITT1 As i1On i1.Father = ot.CodeLeft Join OITM As omOn om.ItemCode = i1.Codewhere ot.Code IN (select i1.Code from ORDR As oLeft Join RDR1 As r1 On r1.DocEntry = o.DocNumLeft Join ITT1 As i1On i1.Father = r1.ItemCodewhere o.DocNum = '51' and r1.ItemCode = 'JDET01' and i1.Code between'JD05'and 'jd15') |
 |
|
|
|
|
|