on 08-29-2012 7:07 AM
Hi,
Try this....
Select max(cast("code" as numeric)) from [@sales_oppor]
Rgds,
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seenu,
By default UDT created 2 fields Code and Name of nvarchar field type. Convert your field to INT
Try
SELECT MAX(CAST(Code AS Int)) FROM @sale
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seenu,
What is the Filed Type for Code... it should be Int as for your required result. I think now it is nvarchar...
try this
SELECT ISNULL(MAX(CAST( code AS Numeric)),0) FROM [sales_oppr]
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seenu,
Try this
SELECT ISNULL(MAX(CAST(" + Column + " AS Numeric)),0) FROM [" + Table + "]
Hope it helps...
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seenu ,
I think the data has some error... check with the Data
your Query is correct
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.