Forum Replies Created

Viewing 15 posts - 1,261 through 1,275 (of 2,452 total)

  • RE: Calulate WeekBegin Date and End Date based on Current Friday Date Dynamically

    just a thought......have you considered using a calendar table to define your "weeks"?

    weeks can be a real PITA....every time I go near them, the powers that be have different...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: FEFO query if condition

    as posted above

    "We would need full DDL and DML for the existing records."

    give us something to work with and you may be surprised at the quality of the answers

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How To Insert 2 Values in 2 columns and rest Hello values in rest columns without using Create Table Statement

    maria.pithia (2/13/2015)


    Hey

    Thanks for the awesome answer.Can you please explain me your code.please.

    Ok...will try....does the following help?

    --first, we can extract the column names from INFORMATION_SCHEMA.COLUMNS

    SELECT

    COLUMN_NAME

    FROM INFORMATION_SCHEMA.COLUMNS

    WHERE TABLE_NAME = N'Test1';

    --We could then...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How To Insert 2 Values in 2 columns and rest Hello values in rest columns without using Create Table Statement

    you dont need to know the number of columns in the table...the code will create a value for each column...be that 3 cols or 30

    does this help.......create the tables if...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How To Insert 2 Values in 2 columns and rest Hello values in rest columns without using Create Table Statement

    maria.pithia (2/12/2015)


    Thank you so much for the ans.

    but wont be it like as becasue we dont know the number of columns in our table.we only know the name of out...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How To Insert 2 Values in 2 columns and rest Hello values in rest columns without using Create Table Statement

    just a thought....maybe something along these lines

    --CREATE TABLE [TEST](

    --[col1] [varchar](5) NULL,

    --[col2] [varchar](5) NULL,

    --[col3] [varchar](5) NULL,

    --[col4] [varchar](5) NULL,

    --[col5] [varchar](5) NULL,

    --[col6] [varchar](5) NULL,

    --[col7] [varchar](5) NULL,

    --[col8] [varchar](5) NULL,

    --[col9] [varchar](5) NULL,

    --[col10] [varchar](5) NULL

    --)

    DECLARE...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How To Insert 2 Values in 2 columns and rest Hello values in rest columns without using Create Table Statement

    is it as simple as setting the default value for all the other columns to 'Hello" (one off job)...then you wont have to worry...just insert values for first...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How To Insert 2 Values in 2 columns and rest Hello values in rest columns without using Create Table Statement

    maria.pithia (2/12/2015)


    Hey

    I am having a table say Test.

    Now i want to do is insert any two values in first 2 columns and rest columns should contain Hello values without considering...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Running total

    GrassHopper (11/25/2014)


    I'm open to undocumented features. Glad you mentioned the issues with the "<=" because I was trying to do something with that. I'll trash that idea and...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Running total

    GrassHopper (11/24/2014)


    I am using SQL Server 2008. Line Number controls the order. Here is some test data to use for my example:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    --===== If the...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Are the posted questions getting worse?

    Ed Wagner (11/22/2014)


    The spam has hit with a vengeance. I'm inclined to agree with a post a while back that it's an actual person, not an automated process. ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Missing members in a table.

    rajkarra91 (11/12/2014)


    Its a flat file data coming from client and loading tha data into a table in database..

    ok...so pls provide flatfile structure and delimiters, the table definition of the destintation,...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Missing members in a table.

    rajkarra91 (11/12/2014)


    140 members who are missing from table. While loading the data into the table, the members are missing. The cause of the missing members needs to be determind and...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Are the posted questions getting worse?

    Melanie.Townsend (11/10/2014)


    Hi guys,

    Can you guys forward those to us (webmaster@sqlservercentral.com)? We're a little curious about our new services as well.

    Thanks

    Melanie

    SQLServerCentral Team

    HI Melanie...I also received the same and have forwarded...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Record count of the coulmn field

    jacksonandrew321 (11/1/2014)


    Hi consider below script

    Create table parcel (id int, name varchar(50), date int, parcel2014 int )

    insert into parcel values (1,'milk',20-12-2014,0), (2,'pen',10-12-2014,0), (3,'copy',02-12-2014,0), (4,'pensil',08-10-2014,0),

    (5,'pulse',07-10-2014,0)

    I want data to be look like below...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 1,261 through 1,275 (of 2,452 total)