Viewing 15 posts - 1,216 through 1,230 (of 13,849 total)
2- I don't see a good way to organize the SQL code in SSMS in Separate folders (like HR Code, Finance Code, Etc..). I can certainly prefix the solution/project...
August 25, 2022 at 2:42 pm
Oh and never use SELECT * in production code.
You have to be careful when using words like 'never'! In my opinion, there is nothing wrong with using SELECT *...
August 25, 2022 at 10:59 am
Thanks for the update and quick reply. I'll be sure to keep an eye on this thread. Looking for the same issue. Bumped into your thread. Thanks for creating...
August 25, 2022 at 9:11 am
I find such formatters to be a bit of a pain in the ass when I need to deviate from what the formatter thinks is a good idea.
If someone...
August 25, 2022 at 8:23 am
Here is another attempt, this time with dynamic column names. As mentioned before, column names must be unique, so I added some suffixes to ensure this.
DECLARE @C0...
August 24, 2022 at 8:52 am
WHERE OrderDate >= DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)
AND OrderDate < DATEADD(DAY, 15, DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0))
August 24, 2022 at 7:44 am
Thanks for your reply Phil, Someone suggested PIVOT would do this, so I was trying to figure out how to do that. While this would be the answer if...
August 23, 2022 at 9:54 pm
Perhaps post a few specific questions in the SSIS forum. You need only a rudimentary knowledge of C# to achieve most of the things you'll need to use a Script...
August 23, 2022 at 12:46 pm
Exporting to CSV may also solve the problem, because then you have full control over the target datatypes.
August 23, 2022 at 11:22 am
The following method is likely to be faster and easier to read than PIVOT:
(Note that column names must be unique)
SELECT PKGId = ct.PC_Pkg_Id
...
August 22, 2022 at 4:28 pm
Try using exactly the same query as your source, but with none of the CONVERTs, and see what happens.
August 22, 2022 at 2:49 pm
Sounds like you need to pay for a software licence.
August 18, 2022 at 12:41 pm
So you are flipping the ones to zeros and vice versa?
DECLARE @SomeTable TABLE
(
SomeId INT IDENTITY(1, 1) NOT NULL
,Sex TINYINT NOT...
August 16, 2022 at 10:36 am
Thank you Jeff.
It was just an example code from a book I'm reading intended to exemplify the use of WHILE in TSQL.
Alejandro
You'll find very few cases in T-SQL where...
August 16, 2022 at 7:00 am
Did you follow the instructions here when attempting the library install?
August 15, 2022 at 2:52 pm
Viewing 15 posts - 1,216 through 1,230 (of 13,849 total)