I added that and it still didn't work?
EXECUTE adm_Supplimental
SELECT
row_number() over (Partition By empid order by empid) as Row,
k.empid,
'Job Title' = CONVERT(nvarchar, DecryptByKey(p1.[job])),
'Job Start' = CONVERT(datetime, CONVERT(nvarchar, DecryptByKey(p1.[Start Date]))),
'Grade'...
I am trying to create a query that numbers my rows and the change of empid, it starts over.. I was looking at some blog on Row_number() but cannot seem to get it to work. Below is my current query, any suggestions would be greatly appreciated!!
EXECUTE adm_Supplimental
SELECT
row_number()...
I have a list of id's that I derived by creating a temp table. From that list I need to get a count by region for each month from Jan. 2009 - Dec. 2010. I am struggling getting this to work? Here is the start of my code:
Create table totalemp# (empid int,geo nvarchar(50))
EXECUTE...
When I try that I get this error:
Implicit conversion from data type varchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.
Could someone please help me out? I have an update statement that I am trying to do and it keeps giving me this error:
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'CONVERT'.???
I have no clue what I am doing wrong..
Here is my code:
UPDATE ystdy_PA0000
SET...
Could someone please help me figure out how to convert the below data:
'19731214' is how the date is printed from the database.
I have tried:
1. CONVERT(varchar, CONVERT(datetime, CONVERT(nvarchar, DecryptByKey(a.[Birth Day])), 101), 101)
But it returns the "Arithmetic overflow..." error...
Okay I added all my criteria in and took your code above and added:
[One-Time Payment Plan] = Case when CONVERT(nvarchar, DecryptByKey(p15.[Wage Type])) = '4000' then 'Commission Payment'
when CONVERT(nvarchar, DecryptByKey(p15.[Wage Type])) = '3030' then 'Recognition Award...
I have a case statment with similar criteria's in them:
Case when role = '8020' and id in (select id from exec) then 'Exec Bonus'
when role = '8020' and not id in (select id from exec) then 'Monetary'
Else '' end.
What is happening is the ones that are not in "exec" are coming back blank...
I have the below data and want to get the max date with all corresponding data:
sapid startdate number cstctr job
500032 02/10/2010 30001450 AR01000008 10000549
500032 04/01/2009 39000345 AR01000003 10000549
500032 09/16/2009 30001380 AR01000003 10000549
500032 09/29/2008 39000345 AR01000003...
I have a project where I need to pull back data based on 2 criterias:
1. Has more than one value in the table
2. At least one of those values fall within the range of
9/27/10-10/25/10.
I have it to where it pulls "1", but now I am struggling with getting it to only pull back "2". The...
What am I doing wrong in the below statement:
CASE
WHEN NOT CAST(CONVERT(nvarchar, DecryptByKey(a.[1003-Ref Salary])) as MONEY) > 0 THEN NULL
WHEN NOT c.Name IS NULL THEN (a.[PP salary-Comm] * CAST(y.[Annual Conversion] as money))
ELSE (CAST(CONVERT(nvarchar, DecryptByKey(a.[1003-Ref...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.