Forum Replies Created

Viewing 15 posts - 241 through 255 (of 423 total)

  • RE: Problem with openxml

    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...

  • RE: Load Encrypted Column Data..............

    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/

     

  • RE: INSERT SELECT with large XML Dataset - XML DTD stripped...

    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...

  • RE: dynamic sql- insert (error)

    prathibha_aviator (2/25/2013)


    I am looping through all the databases for a table and trying to insert data into two columns in that table. So evrything seems right. but when i run...

  • RE: dynamic sql- insert (error)

    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...

  • RE: SQL Query help

    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

    ...

  • RE: dynamic sql- insert (error)

    prathibha_aviator (2/25/2013)


    I am looping through all the databases for a table and trying to insert data into two columns in that table. So evrything seems right. but when i run...

  • RE: conditional sort in sql

    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

    ...

  • RE: column selection on dynamic basis

    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...

  • RE: column selection on dynamic basis

    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 (

    ...

  • RE: column selection on dynamic basis

    asela115 (2/24/2013)


    Hi,

    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...

  • RE: Finding min using over(order by) in sql server

    sunder.mekala (2/20/2013)


    Hi All,

    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...

  • RE: Multiple select in same query

    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...

  • RE: DataType confusion

    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,...

  • RE: In a Jam - Need Some Help

    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...

Viewing 15 posts - 241 through 255 (of 423 total)