Viewing 15 posts - 4,576 through 4,590 (of 5,504 total)
I would perform three steps:
Step 1: get the vendor to permanently modify the .exe excluding the SQL Server stuff.
Step 2a: if they change it, set up your own proper SQL...
January 6, 2010 at 8:54 am
Before talking about how to write a cursor we should talk about what you'd like to do. In most cases a cursor can (and should) be avoided.
January 6, 2010 at 8:48 am
I would use a UNION to get all possible CompanyID as the left side of the joins and join all three other tables to that:
;WITH cte as
(
SELECT CompanyID
from Widgets
UNION
SELECT...
January 6, 2010 at 8:45 am
You should use variable with datetime type. It makes it a lot easier than dealing with the separate parts of a date value. It also helps performance since you don't...
January 6, 2010 at 8:35 am
I keep forgetting to check the forum a question is posted in... Sorry!! :blush:
January 6, 2010 at 7:56 am
Beside your sample data are not wellformed xml data (name tag with spaces), I'd use XQuery instead of openxml:
SELECT
c.value('column1[1]','varchar(30)') as c1,
c.value('column2[1]','varchar(30)') as c2,
c.value('column1500[1]','varchar(30)') as c1500
FROM @xml.nodes('NewDataSet') a(b)
CROSS apply b.nodes('Table')...
January 6, 2010 at 7:20 am
Or are you looking for a reference to the previons date with value=1000
DECLARE @t TABLE (reading_timestamp datetime,value int)
INSERT INTO @t
SELECT '06/09/2005', 1000 UNION ALL
SELECT '07/09/2005', 990 UNION ALL...
January 6, 2010 at 5:55 am
sqlservercentral 53898 (1/6/2010)
I'll give it a try when I...
January 6, 2010 at 5:38 am
You need to divide by 5.0 instead of 5.
Integer divided by integer will result in an integer again...
January 6, 2010 at 4:15 am
BrainDonor (1/6/2010)
He reminds me of one of my kids - he'll put more effort into avoiding doing something than if he just did it and got it out of the...
January 6, 2010 at 4:13 am
Please have a look at the two articles in my signature regarding CrossTab and DynamicCrossTab. I guess you can't use PIVOT since your column names and number of columns will...
January 6, 2010 at 4:07 am
I used the following format file and it worked without any problem:
Please note the way I defined the dob column to be ignored.
9.0
4
1 SQLCHAR...
January 6, 2010 at 4:04 am
You would need a format file to exclude the dob column.
See BOL for details.
January 6, 2010 at 3:17 am
Dave Ballantyne (1/5/2010)
...And another
http://www.dotnetspider.com/forum/236299-Urgently-needed-Stored-Procedure-Please-Dont-Ignore-It.aspx
One thing he deserves credit for is the number of forums he knows to ask for help. :hehe:
January 6, 2010 at 2:40 am
After looking at your solution I found that I need to include the source_ID.
The basic concept of the join is pretty much the same you used. I just have a...
January 6, 2010 at 2:26 am
Viewing 15 posts - 4,576 through 4,590 (of 5,504 total)