Viewing 15 posts - 3,586 through 3,600 (of 8,731 total)
chrisn-585491 (12/21/2015)
I'm glad y'all enjoyed it, but ethically I can't see Disney movies due to their treatment of IT workers.
Where can I read about that?
January 6, 2016 at 1:58 pm
Here's an alternative to generate the rows using cascade CTEs.
I'm including a SQL 2012+ version which you might want to use if at all possible.
WITH
E(n) AS(
...
January 6, 2016 at 1:46 pm
ChrisM@home (1/6/2016)
Check your ANDs and ORs. They don't appear to make sense and your query is probably processing many more rows than it should. Use brackets where appropriate.
You're right, I...
January 6, 2016 at 11:17 am
I don't have test data, but this should be equivalent to your code.
SELECT LoanID
INTO #Loans
FROM srv.dbo.loan
WHERE nextcoupondate <= convert(VARCHAR(10), dateadd(dd, 3, getdate()), 101)
AND nextcoupondate > '4/10/2009'
AND LoanID NOT IN (
SELECT...
January 6, 2016 at 10:44 am
crookj (1/6/2016)
ZZartin (1/6/2016)
whereisSQL? (1/6/2016)
djj (1/6/2016)
Ed Wagner (1/6/2016)
Grumpy DBA (1/6/2016)
Stuart Davies (1/6/2016)
Ed Wagner (1/5/2016)
BrookBenton
Barbi
Ken
Kenworth
Worthless
Arcade
Defender
Avenger
January 6, 2016 at 9:49 am
Here's a nice short article about concatenating strings:
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
Here's an example based on what you posted:
WITH CTE AS(
SELECT DISTINCT ID1, ID2, ID3
FROM #Source
)
SELECT...
January 6, 2016 at 9:20 am
Hugo Kornelis (1/6/2016)
sql_only (1/6/2016)
why does
DECLARE @phi DECIMAL = (SQRT(5)+1)/2
SELECT @phi;
return 2
and not 1.618
Integer math.
The data used as input in the formula are all integers, so the intermediate results are computed...
January 6, 2016 at 9:06 am
mw112009 (1/5/2016)
I know this can be done but I am not sure what system tables/views need to be accessed.
I want to get the stored proc name and stored proc definition...
January 5, 2016 at 11:24 am
river1 (1/5/2016)
Hi,I installed SQL Server MS.
When I try to register (through registred servers) my SSAS I don't get that option.
Whit SQL 2012 tools the option is available.
CAn someone help?
Thanks,
Pedro
Are you...
January 5, 2016 at 9:47 am
This could be a safer approach to prevent unwanted duplicate rows.
WITH cteVessels AS(
--Change this code to something that won't need the DISTINCT
SELECT...
January 5, 2016 at 8:42 am
If anyone else is interested, here's a corrected version of the sample data that actually returns something (other than errors).
CREATE TABLE [dbo].[TblAppointments](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ClientID] [int] NOT NULL,
[ApptDate] [date]...
January 4, 2016 at 1:20 pm
Tallboy (1/4/2016)
January 4, 2016 at 12:54 pm
FridayNightGiant (1/4/2016)
Get a copy of SQL Development edition onto your laptop and...
January 4, 2016 at 12:26 pm
What's the problem with the code that I posted in your previous thread?
http://www.sqlservercentral.com/Forums/FindPost1748928.aspx
Dynamic SQL is the only way to go if the columns will vary in number or names.
January 4, 2016 at 10:37 am
I would try both approaches to see which perform better with your data.
WITH
cte_PartsOrder AS (
SELECT
o.orderid,
o.part,
node = 1,
...
January 4, 2016 at 8:25 am
Viewing 15 posts - 3,586 through 3,600 (of 8,731 total)