Forum Replies Created

Viewing 15 posts - 6,181 through 6,195 (of 15,381 total)

  • RE: Finding missing numbers

    Here is what I came up with. Similar to Hunchback's version but didn't use a function to get the list of values.

    with E1(N) AS (select 1 from (values (1),(1),(1),(1),(1),(1),(1),(1),(1),(1))dt(n)),

    E2(N) AS...

  • RE: Why sql server didn't find my temp table

    Did you mean to use a global temp table?

  • RE: Try to add a column

    karim.boulahfa (12/3/2013)


    MysteryJimbo (12/3/2013)


    You're inserting a value into incident_ref.

    You're primary key (incident_id) is not set as an identity so you need to insert a unique value since you cannot have a...

  • RE: Finding missing numbers

    I would use a tally/numbers table and then a left join.

    The numbers table will change how you look at data.

    http://www.sqlservercentral.com/articles/62867/%5B/url%5D

  • RE: file rename with store procedure

    Trestire (12/3/2013)


    Hi all,

    I've files with an unix timestamp as name. For instance filename: 1081277409

    I've written a function that based on the filename returns the readable dateformat: 2004-04-06 16:50:09.000

    I've done this...

  • RE: create date list

    spin (12/3/2013)


    Hi

    i have a table with accountid, stockid, startdate, enddate.

    i need to create a table which is a list of dates between the start/end dates.

    not sure where to begin??

    thanks.

    You should...

  • RE: PIVOT Me

    marlon.seton (12/2/2013)


    Sean Lange (11/18/2013)


    Revenant (11/18/2013)


    Sean Lange (11/18/2013)


    Revenant (11/18/2013)


    Sean Lange (11/18/2013)


    . . . While the pivot seems a bit contrived here it does a good job of demonstrating how it can...

  • RE: Order My Data

    Here is a great article that explains the non safe approaches to ordering results.

    http://blogs.msdn.com/b/conor_cunningham_msft/archive/2008/08/27/no-seatbelt-expecting-order-without-order-by.aspx

  • RE: Its there a Way to find out

    This topic pops up around here a lot. Both Lowell and I have posted scripts over the years for doing this. A few months ago Chris M came along with...

  • RE: incorrect syntax in datetime

    Also, there is absolutely no need for a cursor here. You can turn this whole looping thing into a single insert statement like this.

    insert into exhibitor.dbo.blgBelongs(OwnerTable,OwnerID,Table1,Table1ID,Table2,Table2ID,TypeID,Enabled,Pro,blgid,LastUpdate)

    select 0,2,20,ID,12,560,80,1,1000,11, '2013-11-26 12:20:30.560'

    from exhibitor.mainTable...

  • RE: Consecutive Row Number

    Hi and welcome to the forums. In order to help we will need a few things:

    1. Sample DDL in the form of CREATE TABLE statements

    2. Sample data in the form...

  • RE: Need Help Onthis Query?

    So what is the question?

    Once we know what the actual problem is we still need a couple things:

    1. Sample DDL in the form of CREATE TABLE statements

    2. Sample data in...

  • RE: split row base

    Rahul Bhosale (11/26/2013)


    Here is the solution check if this fits your criteria.

    create table #t

    (

    name varchar(max)

    )

    insert into #t

    select '1~2' union

    select '1' union

    select '1~4~3' union

    select '2~3'

    select * from #t

    SELECT

    case when...

  • RE: Adding alphabet to a number to make it unique

    gavva.sravan (11/26/2013)


    once the somenum exceeds the alphabet range it should be aa ab ac ad .but this code gives me other characters ([,],$,^,(,),)..

    That is because this is a bad idea....

  • RE: Insert & Update Query for two tables

    vigneshlagoons 51204 (11/26/2013)


    Hi Sean,

    Got it. I made changes to the table. I am not creating a stored procedure, instead I am trying to write two separate queries for Insert &...

Viewing 15 posts - 6,181 through 6,195 (of 15,381 total)