Viewing 15 posts - 3,721 through 3,735 (of 8,731 total)
Sean Lange (11/25/2015)
lnardozi 61862 (11/25/2015)
In the script, you're selecting into a variable. No matter how many rows there are, the variable only gets set once.
Not quite, the OP is using...
November 25, 2015 at 9:27 am
I see the same thing as Sean, there's no hierarchy in what you posted. There's a parent/child relationship, but it won't go multiple levels.
And please, next time post sample data...
November 25, 2015 at 9:18 am
I don't have much experience on any of those and don't have much spare time to play around and set something. Maybe someone else can give you something more specific.
To...
November 25, 2015 at 8:04 am
Rune Bivrin (11/25/2015)
Where can I buy SQL Server 2015?:hehe:
You don't need to buy it, is a free update that comes with Win10 Server Edition.
November 25, 2015 at 6:48 am
You could monitor sys.dm_exec_sessions or set a trace or extended events session.
November 25, 2015 at 6:40 am
You just need to add them to the derived table.
DECLARE @SAMPLE TABLE (ID CHAR(4),Salary INT,Employee_Tax1 INT,Employee_Tax2 INT,Employer_Tax1 INT,Employer_Tax2 INT);
INSERT INTO @SAMPLE(ID,Salary,Employee_Tax1,Employee_Tax2,Employer_Tax1,Employer_Tax2) VALUES ('A001',1000,120,95,125,105);
SELECT
X.ID
,X.[Desc]
,X.Earn_Ded
,X.Employer_Tax
FROM ...
November 24, 2015 at 1:57 pm
jeff.joseph85 (11/24/2015)
November 24, 2015 at 12:52 pm
You have it "backwards".
Try: CASE When TITLE.MilSrchPerfrmed is null then 0 else 1 end AS MSP
November 24, 2015 at 12:24 pm
If you don't know, throwing queries at us won't work. We have no idea on how does your environment looks like. You mentioned that you're having an issue with your...
November 24, 2015 at 12:12 pm
A shorter version with sample data:
USE tempdb
GO
CREATE TABLE #Test( pieces int);
WITH
E(n) AS(
SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)
),
E2(n) AS(
SELECT a.n FROM E a, E...
November 24, 2015 at 12:02 pm
That doesn't explain why would the query use the underscore in the WHERE clause.
If this is an export for a migration and not a permanent process, I suggest that you...
November 24, 2015 at 10:36 am
SQL Server 2005 doesn't have IIF(), you need to replace it with a CASE.
SQL Server uses DISTINCT instead of DISTINCTROW.
Access and SQL Server syntax are not the same, so...
November 24, 2015 at 9:38 am
I believe this should be equivalent.
SELECT sum ( isnull ( s.amt_du_ic, 0 ) ),
d.pmt_dte,
r.juris_id,
c.acna,
...
November 24, 2015 at 9:33 am
Something like this?
SELECT login_name
FROM sys.dm_exec_sessions AS DES
GROUP BY DES.login_name
HAVING COUNT( DISTINCT DES.host_name ) > 1
November 24, 2015 at 8:31 am
Viewing 15 posts - 3,721 through 3,735 (of 8,731 total)