Viewing 15 posts - 241 through 255 (of 423 total)
The immediate problem is having PKID set as an IDENTITY. Ditch that and it will run as is.
PKID INT IDENTITY(1,1) NOT NULL
Another thing that can cause a problem is the...
February 27, 2013 at 11:19 pm
Here's an example by Steve Jones that should help get you started. And he uses a salary column for his encryption/decryption example. 😉
http://voiceofthedba.wordpress.com/2012/06/27/using-a-symmetric-key/
February 27, 2013 at 9:56 pm
To get this to convert to XML I had to strip out the first 3 lines due to an encoding error. For me, this is not uncommon and I have...
February 26, 2013 at 5:21 pm
prathibha_aviator (2/25/2013)
February 26, 2013 at 9:33 am
prathibha_aviator (2/26/2013)
DO you think applying joins on a table column with NULLS and a table column which is a primary key in it is showing the error??????
Doing a join between...
February 26, 2013 at 8:36 am
You need the function Sean mentioned, then use a CROSS APPLY:
SELECT
N.ItemID
,N.ItemName
,N.Notes
,N.DisplayIndex
,dsk.Item AS Result
FROM
...
February 25, 2013 at 11:43 pm
prathibha_aviator (2/25/2013)
February 25, 2013 at 11:33 pm
I think the best way is to use the ROW_NUMBER operator in a CASE statement. Here's a test procedure you can run to see how it works.
CREATE PROCEDURE dbo.TestConditionalOrdering
...
February 25, 2013 at 11:19 pm
OK, I figured out another way to do this where you can pass in the column by variable. This method is called a Partitioned View. It requires that you set...
February 25, 2013 at 9:19 pm
Just use the same code I posted above except change it around to suit your needs.
IF OBJECT_ID('tempdb..#TestTable') IS NOT NULL
DROP TABLE #TestTable
CREATE TABLE #TestTable (
...
February 25, 2013 at 7:02 pm
asela115 (2/24/2013)
How can i select columns of a table dynamically through a select statement if the column name need to be changed based on the value selected in a Combo...
February 24, 2013 at 6:21 pm
sunder.mekala (2/20/2013)
I am trying to write a sql to find the minimum of a dataset
i am using sql server.
select ST.BG_DTTM
,MIN(ST.BG_DTTM) over(ORDER BY ST.BG_DTTM) AS "Minim"
from
tablename ST
but it is giving...
February 20, 2013 at 10:20 am
I went into more detail to break down the call status. I added a category 'Abandoned' to apply to callers who were never answered. I wasn't sure how to handle...
February 17, 2013 at 5:12 pm
Just to get in my 2 cents. If it's a number, store it as a number. If it just LOOKS like a number (zip codes, phone numbers, govt ID numbers,...
February 17, 2013 at 3:25 pm
Just off the top of my head, I'd suggest that you need a date table so you don't have to try and calculate the FY and the date range for...
February 17, 2013 at 3:12 pm
Viewing 15 posts - 241 through 255 (of 423 total)