Viewing 15 posts - 61 through 75 (of 106 total)
In Place of NVL just replace with COALESCE
CASE WHEN ORDER.CATEGORY_CODE = 'RETURN' THEN
(COALESCE(ORDER.ORDERED_QUANTITY,0) - COALESCE(ORDER.SHIPPED_QUANTITY,0) ) *-1
ELSE
(COALESCE(ORDER.ORDERED_QUANTITY,0) - COALESCE(ORDER.SHIPPED_QUANTITY,0) )
END Qty,
April 18, 2011 at 12:03 am
declare @xml xml
set @xml='<Record>
<RecordID>1</RecordID>
<Quantity>3</Quantity> --I can update the quantity table for this recordid
<Photos>
--Could be any number of photos - need to create entry in table for each photo storing...
April 15, 2011 at 5:17 am
You can use RAND() function to get the result
SELECT TOP 5
columnname,
...
April 14, 2011 at 12:26 am
Try this may help you
SELECT *
FROM Articles
WHERE ArticleType=case when @ArticleType ='All THEN ArticleType ELSE @ArticleType END
April 12, 2011 at 5:15 am
try below query
DECLARE @areacode VARCHAR(32)
SET @areacode= '00000012345'
SELECT Right(@areacode, Len(@areacode) + 1 - Patindex('%[^0]%', @areacode))
March 28, 2011 at 4:29 am
You can also try below query to get result
select stuff(path,charindex('_',path),len(path),'')
from abc_tmp
March 24, 2011 at 12:40 am
You can disable all contraint from table
EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL"
delete data from table
enable all contrainst
EXEC sp_MSforeachtable @command1="ALTER TABLE ? CHECK CONSTRAINT ALL"...
March 23, 2011 at 6:33 am
You can create procedure and list value pass to procedure as comm delimited
create USP_Insert_table (@list varchar(8000)='a.txt,b.txt,c.txt')
as
begin
insert into #table (text_name)
select data from dbo.f_Split(',',@list) where data<>''
end
function dbo.f_Split will split the...
March 21, 2011 at 3:25 am
Change the Capability lable of database.
Select Server intance --> property -->general -->version ---previouse version current version(9.00.0000.00)
March 21, 2011 at 1:22 am
Return One column in result set and use that column to hide the column from report.
Use Expression on Column proeprty(SSRS) if value is 1 the hide and 0 then visible.
Regards,
Srikant...
March 4, 2011 at 12:32 am
Use the below SQL statment to get the request
Declare @sqlquery VARCHAR(max)
SET @sqlquery = 'select a.* from AWD.dbo.Account a'
SELECT substring(@sqlQuery, charindex('AWD.dbo.Account', @sqlquery), len('AWD.dbo.Account'))
February 27, 2011 at 11:31 pm
You can use below sql and its completely upto you ...
drop table ##Z
SELECT name + '_' + column_name as [Name],
[Value]
into ##Z
FROM...
February 24, 2011 at 2:11 am
Use below T-Sql help you to get the result . If you have more than 10 column use dynamic sql
SELECT name + '_' + column_name as [Name],
...
February 22, 2011 at 3:51 am
Viewing 15 posts - 61 through 75 (of 106 total)