Forum Replies Created

Viewing 15 posts - 8,881 through 8,895 (of 10,144 total)

  • RE: searching for ASCII ranges in a string

    You could use a tally table:

    DECLARE @Search_Surname VARCHAR(40)

    SET @Search_Surname = 'MIxED CaSE SUrNAME'

    SELECT @Search_Surname = STUFF(@Search_Surname, NUMBER, 1, '#')

    FROM NUMBERS

    WHERE NUMBER <= LEN(@Search_Surname)

    AND ASCII(SUBSTRING(@Search_Surname, NUMBER, 1)) > 90

    SELECT REPLACE(@Search_Surname,...

  • RE: How can you supress the dash line in the output

    Steve, can you post the following please -

    The statement from the sproc which writes out the text file

    A sample of the text file to show exactly what you are...

  • RE: Reducing common data into fewer rows.

    Provided that there aren't any gaps in each group, then this will work:

    DROP TABLE #ProductStatus

    CREATE TABLE #ProductStatus (ItemCode varchar(20), Units int, Place varchar(5), Status int, StartDate datetime, EndDate datetime, Flag...

  • RE: Converting rows into columns

    Old-fashioned SQL works well too:

    SET DATEFORMAT MDY

    DROP TABLE #Temp

    CREATE TABLE #Temp (Id_solution INT, Parameter_nm VARCHAR(50), Parameter_value VARCHAR(50))

    INSERT INTO #Temp (Id_solution, Parameter_nm, Parameter_value)

    SELECT 11111111, '"Data1":"Sample1"','9' UNION ALL

    SELECT 11111111, '"Table1"','7' UNION ALL

    SELECT...

  • RE: Help - Report Query

    Hi Phil

    Looking at your query, I reckon it can be simplified quite a bit - which would usually help with aggregation. Let's have a try.

    Firstly, changing it so that the...

  • RE: How to delimit ‘-’ string?

    Numerous udf's have been posted, search under split string, e.g. http://www.sqlservercentral.com/scripts/Miscellaneous/31913/

    This[/url] excellent article shows how to do it with a tally table.

    Cheers

    ChrisM

  • RE: Are the posted questions getting worse?

    Lynn Pettis (1/21/2009)


    The desert stretches out in the distance and a lone figure can be seen running deeper into the desert. It appears that this person is screaming wildly...

  • RE: convert DateTime to BigInt

    munishprathap (1/20/2009)


    Thanks friends for all your support

    i can achieve this task by the following Query,please let me know your feedback

    IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS

    WHERE TABLE_NAME = 'Note'

    AND...

  • RE: convert DateTime to BigInt

    Jeff Moden (1/20/2009)


    Doesn't matter if there's 0 data or a billion rows... it's a terrible change to make and if an instructor is teaching someone that this is the right...

  • RE: convert DateTime to BigInt

    Christopher Stobbs (1/20/2009)


    I'm with Jeff on this, why do you need to make the change?

    Because...

    There's no data in the table, although for the purpose of this exercise we must assume...

  • RE: convert DateTime to BigInt

    munishprathap (1/20/2009)


    in future table will have more than thoushand of records

    at tht time thy dnt need to copy the table content

    thy need only to change the data type Datetime to...

  • RE: convert DateTime to BigInt

    munishprathap (1/20/2009)


    No

    If no other students are using it, why don't you simply script a new table using EM and copy the data into it?

  • RE: convert DateTime to BigInt

    munishprathap (1/20/2009)


    Ok thts great

    its having 10 rows and one column have DateTime type with values.

    Is this table heavily used at present?

  • RE: convert DateTime to BigInt

    munishprathap (1/20/2009)


    we cant predict no. of rows affected assume tht tables have 10 rows

    How many rows do you have in the table right now?

  • RE: convert DateTime to BigInt

    munishprathap (1/20/2009)


    not lik tht,

    values entered in these column was datetime only but in future i need to make entries

    only as bigint

    How many rows are currently affected?

Viewing 15 posts - 8,881 through 8,895 (of 10,144 total)