Viewing 15 posts - 5,896 through 5,910 (of 8,731 total)
You're welcome.
I hope that you've learned something from this. The main lesson would be that you don't need to count yourself because SQL Server will do it for you....
September 1, 2014 at 1:50 pm
Local temp tables and table variables will loose scope when executing xp_cmdshell. Have you tried with a global temp table? Or simply creating a permanent table.
September 1, 2014 at 12:45 pm
Here's my version of the code. I just added a column to your select. Be sure to understand how does it work and ask any questions that you have.
The startdate...
September 1, 2014 at 9:28 am
I haven't read all of Megha's code. I stopped at the function because that will be extremely unefficient. Check this alternative that uses an inline table valued function that will...
September 1, 2014 at 9:04 am
Why are you converting to datetime and then back to varchar? Why varchar instead of char?
SQL Server won't recognize the MMDDYYYY format as a valid date, you need to supply...
August 29, 2014 at 2:00 pm
This could be accomplished without a loop using the modulo operator.
To get a coded answer, please provide DDL and sample data in a consumable format.
August 29, 2014 at 12:02 pm
Welsh Corgi (8/29/2014)
I want to do the Equivalent of the following SQL Select and return the result listed below:
SELECT CONVERT(DATE,GETDATE()) AS CurrentDate;
CurrentDate
2014-08-29
Thank you.
Equivalent in Oracle?
SELECT SYSDATE AS Datetype,
...
August 29, 2014 at 8:17 am
The RIGHT function is one option, you could also use STUFF function. Additionally, you could cast your result as a numeric data type.
However, the most important thing to remember is...
August 28, 2014 at 6:02 pm
No, each instance must have its own port.
August 28, 2014 at 4:58 pm
Are you using Sharepoint Services with Access? is that possible? or is that a different MOSS?
August 28, 2014 at 4:56 pm
You can use cross tabs to get the results as desired. You can read about them in here: http://www.sqlservercentral.com/articles/T-SQL/63681/
I changed your query to make it easier to read (for me)...
August 28, 2014 at 3:04 pm
This is one of the reasons to normalize our tables. To help you with this, I'm using a delimited string splitter (or I should say THE delimited string splitter). You...
August 26, 2014 at 6:13 pm
It's a little confuse, but the problem is that you're returning the value of a function and not a row or group of rows. Would that make sense to you?
August 26, 2014 at 6:01 pm
Yo need to remove the GO between both inserts. That's a batch separator and causes the variables to get out of scope.
Beware on the use of @@IDENTITY as it can...
August 26, 2014 at 12:24 pm
skorcher (8/26/2014)
Thank you so much - that works!...
Would one be a recommended approach over the other?
You're welcome.
My recommendation would be to test both approaches. If both return the same results...
August 26, 2014 at 10:53 am
Viewing 15 posts - 5,896 through 5,910 (of 8,731 total)