Forum Replies Created

Viewing 15 posts - 136 through 150 (of 230 total)

  • RE: How to get the next Identity within an Merge Insert? Converting RBAR to SET based.

    How I've dealt with getting a set of unique identifiers ahead of time is to insert a dummy row into your iterating table (#RIN_Table in your example) and then use...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: json into sql server

    Depending on what's in between ElasticSearch and SQL, a rudimentary .Net application can quite easily de-serialize the JSON before putting it into SQL.

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Looking at the details of a nonclustered index

    you can also join out to sys.index_columns

    select

    TableName = object_name(i.object_id),

    IndexName = i.name,

    ColumnName = col_name(i.object_id, ic.column_id)

    from sys.indexes i

    inner...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: LIKE and IN in same where clause

    ;with LikeList (string) as

    (

    select 'Bob' union all

    select 'Jane' union all

    select 'Bill'

    ), sourceTable (string) as

    (

    select...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Energy sumary Reports

    Sorry, I missed that part. But similarly to how you can group on the derived column for the Tariff Group, you can group on a derived column for the month....

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Energy sumary Reports

    I'd use a computed column (or if you dont want to use a temp table, you can just select the expression) to define whether the tariff rate is "X" or...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Duplicate Record Issue

    Hi Blyzzard,

    Can you please provide the table structures of both tables (including their primary keys) as well as some sample data?

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Compare two varchar for similarities

    SOUNDEX is one option, albeit not a great one. you might be able to get clever with it to get you close enough. You could pipe the results through a...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Full outer join question

    I wish there were a precise answer I could give you, but there are a lot of unknowns (including what the actual table structure, existing indices and data look like),...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Full outer join question

    Couple things.

    First and foremost, you're not going to know how a SQL call scales to "very large" table sizes with table variables. Table variables by nature have no statistics built...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Modify Script for Multiple Parameter Values

    If you want to go the string split route, you might as well go all out. If you want to read through it, I'd check out this article, but the...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Modify Script for Multiple Parameter Values

    Since I obviously don't have access to your tables, I'd double check this does what you anticipate, but here's how I'd rewrite the script to do this as set based...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Detect / Determine data stored in a varbinary field

    You can try converting the string to varchar or nvarchar to see if meaningful text comes out, but that assumes meaningful text was put in in the first place. If...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Subquery returned more than 1 value Error

    I need to stress here that I'm making several leaps of logic about your database schema.

    The primary keys of table1 and table2 plus the rules of how each are...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Subquery returned more than 1 value Error

    Would this work?

    insert into table2

    select

    emplid,

    applicationid,

    programid

    from table1 a

    left outer join table2 b

    on a.emplid = b.emplid

    ...

    Executive Junior Cowboy Developer, Esq.[/url]

Viewing 15 posts - 136 through 150 (of 230 total)