Viewing 15 posts - 4,846 through 4,860 (of 8,731 total)
I would go with something simple like:
CREATE TABLE #Invoice
(
Invoice_Number int,
Invoice_Date date,
Item_Name varchar(40)
)
INSERT INTO #Invoice(Invoice_Number, Invoice_Date, Item_Name)
SELECT 10001,...
June 4, 2015 at 11:12 am
Could you post a sample of the file? Without real data and just enough rows to understand the different formats.
June 4, 2015 at 9:38 am
I believe that the formula to calculate the date is a little bit wrong.
Here's an example according to what I understood:
DECLARE @Date datetime= GETDATE()
SELECT DATEADD(MM, DATEDIFF(MM, '19010101', @Date), '19000101'), --Using...
June 3, 2015 at 1:58 pm
Eirikur Eiriksson (6/3/2015)
SQLRNNR (6/3/2015)
Ed Wagner (6/3/2015)
SQLRNNR (6/3/2015)
Brandie Tarvin (6/3/2015)
I am going to report ya'll to the USDA for pork chop abuse.I just thought you should know.
Actually, these days it should...
June 3, 2015 at 12:05 pm
Eirikur Eiriksson (6/3/2015)
SQLRNNR (6/3/2015)
Lynn Pettis (6/2/2015)
SMH...Why would the person who wrote the procedure ask on a public forum why his procedure is returning a value of -6 when executed?
Just tell...
June 3, 2015 at 10:30 am
Hopefully, you did understand why were you getting an error and how the syntax works. CTEs and UNION (ALL) are part of a single statement and can't be divided by,...
June 3, 2015 at 10:18 am
I'm including the code to retrieve the text between [] and avoid rows that won't contain a proper format. Feel free to modify it as needed and ask any questions...
June 3, 2015 at 10:05 am
You have your syntax wrong. Additionally, CTEs won't work on SQL Server 2000 and previous.
For 2005+ this syntax would work.
Select columns
into #tableA
from SometableA
where SomeCondition
--order by --unnecessary
;
Select columns
into #tableB
from SomeTableB
where...
June 3, 2015 at 9:41 am
I assume that you mean a single statement when you mention "no stored procedure".
Here's a possibility and I'm sure that there are many other ways to do it.
DECLARE @TierId int...
June 3, 2015 at 9:26 am
Lynn Pettis (6/2/2015)
SMH...Why would the person who wrote the procedure ask on a public forum why his procedure is returning a value of -6 when executed?
Is a well known fact,...
June 2, 2015 at 12:24 pm
Why are you trying to reinvent the wheel? There are numerous password generators that will be able to follow different rules according to necessities (ensuring the use of upper and...
June 2, 2015 at 11:24 am
This might probably won't help if you want something free, but the manga guide to databases explains databases in a great way for non-technical people and you could get ideas...
June 2, 2015 at 10:17 am
Jason A. Long (6/1/2015)
TheSQLGuru (6/1/2015)
Thanks for that Jason!
No problem. Thanks for kicking me in the back side to get it done... With the data partition and the select output. 😀
When...
June 2, 2015 at 9:02 am
I'm not sure if it's an improvement, just a fun way to save some keystrokes.
SELECT
SD.Id
,ABS(SUM(SD.Value*SIGN(Type-1.5))) AS Value
FROM dbo.TBL_SAMPLE_DATA_012 SD
GROUP BY...
June 1, 2015 at 2:54 pm
This makes no sense for me, but using the sample data previously posted, I can get the expected results with 2 options (none of them use SUM function).
SELECT a.UserID,
...
June 1, 2015 at 2:47 pm
Viewing 15 posts - 4,846 through 4,860 (of 8,731 total)