Viewing 15 posts - 3,871 through 3,885 (of 8,731 total)
Can you define "not working" and post expected results based on the new sample data?
P.S. Your new sample data doesn't have the same DDL as the previous one.
November 10, 2015 at 8:28 am
david.gugg (11/10/2015)
November 10, 2015 at 7:53 am
Probably something like this?
SELECT c.KeyProductControlDisplay,
c.KeyProductControlDisplayParent,
c.ProductCaption,
c.FormOrder
FROM [dbo].[xyzabc11] c
LEFT
JOIN [dbo].[xyzabc11] p ON c.KeyProductControlDisplayParent = p.KeyProductControlDisplay
ORDER BY ISNULL(p.KeyProductControlDisplay,...
November 10, 2015 at 7:34 am
iain.jacob 29849 (11/10/2015)
There is always another way...WHERE js.next_run_date = cast(convert(varchar(8),GETDATE(),112) as int);
I'll just drop the var part as you'll never have a different length.
November 10, 2015 at 6:43 am
Larnu (11/10/2015)
You could also use format (as below), if using SQL Server 2012 or later.
where js.next_run_date = cast(format(GETDATE(), 'yyyyMMdd') as int)Cheers!
Knowing format is several times slower than any other alternative,...
November 10, 2015 at 6:38 am
TomThomson (11/9/2015)
Got it shan't ask any more question, take this to mean support questions too, so will try google in future! Thought this was a supportive community. apparently not! Sorry...
November 9, 2015 at 1:11 pm
Have you read about slowly changing dimensions type 2? It seems to be what you need.
November 9, 2015 at 12:58 pm
You're welcome.
Now that I think about it, this might work better as an inline table valued function. I don't have time to test this right now, but it could be...
November 9, 2015 at 12:45 pm
It seems to copy the OP for forum threads and then link to the thread to "read the full article". I'm not sure how that should be considered. And I'm...
November 9, 2015 at 11:45 am
You're right, there's an error on the calculation that must be fixed for issue #1.
To fix it, the JOIN condition should look like this:
JOIN cteTally t...
November 9, 2015 at 10:57 am
Does anyone here knows the site howtosql.com? I was searching for an old thread on Google and found that "I'm an author" for them. It was actually linking to forum...
November 9, 2015 at 9:41 am
By the way, it seems that you're using INSERT INTO SELECT...FROM OPENROWSET when a BULK INSERT with a proper format file would be more appropriate, unless the double quotes are...
November 9, 2015 at 9:21 am
OPENROWSET doesn't allow variables. You need to concatenate the values.
I'm assuming certain things in this example:
DECLARE @LocalSQLFilePath NVARCHAR( 500) = 'c:\path\file.txt',
@LocalSQLFmtFilePath NVARCHAR( 500) = 'c:\path\file.fmt',
...
November 9, 2015 at 9:13 am
datsun (11/9/2015)
If I remove all the dashes in yyyy-mm-dd and replace with yyyymmdd, then is it safe regardless of the login default language setting?
Yes
November 9, 2015 at 8:45 am
Viewing 15 posts - 3,871 through 3,885 (of 8,731 total)