Viewing 15 posts - 1,591 through 1,605 (of 1,920 total)
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
Buddy, small tweaks in the code will get you there!
For this requirement,
The SELECT statement for the INSERT should return these records:
A,5
C,1
These are the records in #ListUpdate that are not in...
May 5, 2010 at 10:31 am
Wonderful question and equally wonderful explanation. The basics is hit in the nail! Thanks for this!
May 5, 2010 at 10:10 am
Hey there! I have coded an below-par code for this requirement! This is what that struck my mind! Pro'ly there are many altenative super-fast , minimal-code, optimal-performance code available....
May 5, 2010 at 8:34 am
Viewing 15 posts - 1,591 through 1,605 (of 1,920 total)