Viewing 15 posts - 1 through 15 (of 18 total)
Thanks for your response..
I need little more specific..
Business logic is I need to export all values from a table without any duplication. I considered Test. Test.. are the duplicates.
The value...
January 1, 2014 at 11:11 pm
Hi,
When you create a foreign key, it should reference either primary key or Unique key.
In table GV_Voucher, please make sure TransactionID as Primary Key or Unique key.
April 26, 2013 at 12:50 am
Hi,
CREATE TABLE #Temp
(
AutoId int,
EmpId int,
TimeIn datetime,
TimeOut datetime
)
INSERT #Temp (AutoId, EmpId, TimeIn, TimeOut) VALUES (1, 1009, '10-13-2012...
October 15, 2012 at 4:36 am
Hi Dude,
Instead of using CURSOR you can try WHILE loop like below example.
If possible dont use CURSORs in the procedure.
DECLARE @tblMain AS TABLE (dateC DATETIME, valC FLOAT)
DECLARE @tblMain2...
October 15, 2012 at 4:00 am
Hi,
Try this code..
CREATE TABLE #IREMS (ItemID INT, City VARCHAR(20))
INSERT INTO #IREMS (ItemID , City )
SELECT 11, 'a' UNION ALL
SELECT 22, 'b' UNION ALL
SELECT 33, 'a' UNION...
December 29, 2011 at 9:53 pm
Hi Kiara,
Please check the below modified code.It shows your expected result.
select p.projectid,
apCount = COALESCE(countap,0)
, arCount = COALESCE(countar,0)
from #projectList p
left...
August 13, 2011 at 12:04 am
You may get better insight through the link
I have a blog article to maybe assist you with your question:
http://www.sql-programmers.com/Blog/tabid/153/EntryId/16/Stored-Procedures.aspx
SQL Server Programmers and Consultants
September 19, 2010 at 11:10 pm
I have a blog article to maybe assist you with your question:
http://www.sql-programmers.com/Blog/tabid/153/EntryId/6/Using-PIVOT-and-UNPIVOT.aspx
SQL Server Programmers and Consultants
September 9, 2010 at 2:51 am
Iif((SUM(Fields!Percent_Met_Deployment_Complete_Target.Value) <> 0,
(SUM(Fields!Percent_Met_Deployment_Complete_Target.Value * Fields!Count_Equipment_Delivered.Value) /
SUM(Fields!Count_Equipment_Delivered.Value)), 0)
((Iif(SUM(Fields!Percent_Met_Deployment_Complete_Target.Value) = 0,
(SUM(Fields!Percent_Met_Deployment_Complete_Target.Value * Fields!Count_Equipment_Delivered.Value) /
SUM(Fields!Count_Equipment_Delivered.Value)), 0))
In the above code I assume that , the following is first part and the remaining is second...
September 9, 2010 at 12:35 am
Try this,
CREATE TABLE tblXML (ID INT PRIMARY KEY, xmlVal XML not null)
insert into tblXML values(2,'<a><b>1234</b></a><a><b>222</b></a><a><b>333</b></a>')
select * from tblXML
SELECT x.query('b').value('.','varchar(100)') as Product
FROM tblXML CROSS APPLY xmlVal.nodes('/a') AS Tref(x)
Result:
Product
1234
222
333
September 9, 2010 at 12:12 am
Using PIVOT .......
See this link .this will give you example Query......
Link:
http://www.sql-programmers.com/Blog/tabid/153/EntryId/6/Using-PIVOT-and-UNPIVOT.aspx
SQL Server Programmers and Consultants
July 22, 2010 at 2:12 am
Hi Sethuraj,
Check your reply, the variables still having the old values
DECLARE @Var1 varchar(100),@Var2 varchar(100)
SET @var1='Sethuraj'
SET @var2='Sahithya'
select @var1,@var2
SELECT SUBSTRING(@var1+@var2,CHARINDEX(@var2,@var1+@var2),LEN(@var1+@var2))
SELECT SUBSTRING(@var2+@var1,CHARINDEX(@var1,@var2+@var1),LEN(@var2+@var1))
select @var1,@var2
July 20, 2010 at 12:08 am
I have a blog article to maybe assist you with your question:
http://www.sql-programmers.com/Blog/tabid/153/EntryId/6/Using-PIVOT-and-UNPIVOT.aspx
SQL Server Programmers and Consultants
July 19, 2010 at 11:46 pm
As per my assumption there is no possibility of swapping the variable values with out using temp variables in SQL 2000. If it is 2 columns then this is...
July 19, 2010 at 11:39 pm
Viewing 15 posts - 1 through 15 (of 18 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy