Viewing 15 posts - 1,591 through 1,605 (of 1,923 total)
Nagesh S-432384 (5/7/2010)
Jeff i learned more about CTE from this post
Wow, good that you learned more abt CTE from that code. Am very happy! :blush:
I just tried query to...
May 7, 2010 at 6:08 am
clucasi (5/7/2010)
Thanks for the solution,
You're Welcome, clucasi! Glad that my code helped you!
This query has to work on other tables as well ie
Street Descriptortype 15 when id(15), Street record-Type11 when...
May 7, 2010 at 6:06 am
riyaz.mohammed (5/6/2010)
SEQUENCE,PRODUCT,TIME,PRICE
1,Spoon1,2010-05-05 08:30:00.000,83.50
2,Spoon1,2010-05-05 08:31:01.000,80.00
3,Spoon1,2010-05-05 08:32:02.000,81.00
4,Spoon1,2010-05-05 08:33:03.000,82.00
5,Fork1,2010-05-05 08:31:01.00,90.50
6,Fork1,2010-05-05...
May 7, 2010 at 6:00 am
Hi there, can you please provide us how your desired output will look like. i have actually coded a piece for you, but i want to confirm it with your...
May 7, 2010 at 5:52 am
Thanks for the reply, jdddd2! But i need a T-SQL code, as in Ron's example to perform my task!
Anyways, thanks for the info!
May 6, 2010 at 12:26 pm
Bhuvnesh (5/6/2010)
ColdCoffee (5/6/2010)
May 6, 2010 at 12:24 pm
Hi there, this will do the trick for you!
First lets set up the environment to work on by providing the sample data and the DDLs
IF OBJECT_ID('TEMPDB..#PRODUCTS') IS NOT NULL
DROP TABLE...
May 6, 2010 at 12:22 pm
I don't exactly understand your requirement, but based on your CASE statement in the first post and some bits-and-pieces i understood from other posts, i have coded one query here....
May 6, 2010 at 8:33 am
Try this Henri!
DECLARE @SQLString nvarchar(500);
DECLARE @ParmDefinition nvarchar(500);
DECLARE @Count varchar(30);
DECLARE @server VARCHAR(128)
SET @server = 'dev-server'
SET @SQLString = N'SELECT @CountOUT = count(name) FROM OPENDATASOURCE(''SQLNCLI'',
...
May 6, 2010 at 6:35 am
Oh Ron, thanks! I always had a doubt that this has something to with the ODBC drivers.And you have now confirmed it!
Thanks for your efforts and time, Ron!
May 6, 2010 at 5:20 am
This must be done in 2 phases (i mean, 2 different queries)!
1. Find out the entries that have "I", use LEFT JOIN and insert them into your target table.
2. For...
May 6, 2010 at 4:13 am
You can use this following code to get the details you asked for:
SELECT * FROM dbo.SYSFILES F
LEFT JOIN SYS.FILEGROUPS FG
ON F.GROUPID = FG.DATA_SPACE_ID
Cheers!!
May 5, 2010 at 10:30 pm
Mark-101232 (5/5/2010)
Try this
CREATE FUNCTION dbo.InsertCommas(@s VARCHAR(100))RETURNS VARCHAR(100)
AS
BEGIN
SELECT @s=STUFF(@s,Number,0,',')
FROM master.dbo.spt_values
WHERE Number BETWEEN 2 AND LEN(@s) AND type='P'
ORDER BY Number DESC
RETURN @s
END
GO
DECLARE @s VARCHAR(100)
SET @s='W'
SELECT @s,dbo.InsertCommas(@s)
SET @s='ABWI'
SELECT @s,dbo.InsertCommas(@s)
SET @s='AW'
SELECT @s,dbo.InsertCommas(@s)
Mark, excellent solution!...
May 5, 2010 at 8:35 pm
I think i might get you what you want, but i need to see a visual representation of what your end result would be.
Desired results in the form of something...
May 5, 2010 at 10:38 am
Viewing 15 posts - 1,591 through 1,605 (of 1,923 total)