Forum Replies Created

Viewing 15 posts - 316 through 330 (of 2,452 total)

  • RE: Remove decimal from varchar field

    ScottPletcher (11/3/2016)


    SELECT

    SD.NUMBERS

    ,RIGHT('0000000' + REPLACE(NUMBERS, '.', ''), 7)

    FROM SAMPLE_DATA SD;

    which I believe is what I posted earlier

    CASE...

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

  • RE: Remove decimal from varchar field

    maria.lindquist (11/2/2016)


    The current value is of varchar(7) type.

    ok, without you answering the rest of my question for expected results on various scenarios...here is shot in the dark :

    CREATE TABLE #test(CurrentValue...

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

  • RE: Remove decimal from varchar field

    maria.lindquist (11/2/2016)


    How can I use SQL to remove a decimal from a field value.

    Current value = 1.66770

    Correct value = 0166770

    what datatype is "current value"?

    what would you expect for Current...

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

  • RE: I need help with a query

    camiloecheverry11 (10/19/2016)


    This is exactly how I have the entire query.

    SELECT item_location_view.item_id AS 'Item',

    item_location_view.item_desc AS 'Description',

    inv_mast.class_id1 AS 'Brand',

    item_location_view.location_id AS 'Location',

    item_location_view.qty_on_hand AS 'Qty on Hand',

    item_location_view.qty_allocated AS 'Qty Allocated',

    item_location_view.qty_on_po...

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

  • RE: I need help with a query

    why are you using ">$0" ...ie the $ sign?

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

  • RE: I need help with a query

    what have you tried so far?

    from you brief details maybe

    SELECT a,

    b,

    c

    FROM sometable

    WHERE(a >= 0)

    ...

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

  • RE: Pivoting data

    Aquilagb (10/19/2016)


    Hello,

    I have a SQL query which works fine and returns 10 columns and one row of data. What I would like is to pivot this data so that...

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

  • RE: SQL query running slow after upgrading from 2005 to SQL 2012

    are you able to post the .sqlplan rather than the word doc please?

    what does your "dbo.function" perform?

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

  • RE: ref integrity after Migrating database to sql server 2008 R2

    WendellB (10/19/2016)


    J Livingston SQL (10/19/2016)


    I think you have to set up the the RI in the SQL Server environment, not via your Access FE.....I may be wrong though

    You are correct...

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

  • RE: Urgent please help--Append Date(yyyymmdd format) to filename (Example: tnvin_20161019.txt)

    andrew gothard (10/19/2016)


    SELECT REPLACE(REPLACE(REPLACE(CAST(CONVERT(VARCHAR(19), GETDATE(), 120) AS VARCHAR(10)),'-',''),':',''),' ','');

    hth

    SELECT CONVERT(VARCHAR(10),GETDATE(),112)

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

  • RE: Get range of on the basis of Value grouping

    possibly ??

    WITH cte AS (

    SELECT Date,

    Amount,

    ROW_NUMBER() OVER(ORDER BY date) - DENSE_RANK() OVER(PARTITION BY amount ORDER...

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

  • RE: Sql query to find max value within 60 seconds ....

    I really dont follow your question....can you please expand and explain.

    and to help all of us help you....here's how to post sample data

    CREATE TABLE #yourtable(

    id ...

    ________________________________________________________________
    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?

    ChrisM@Work (10/19/2016)


    BLOB_EATER (10/19/2016)


    Brandie Tarvin (10/19/2016)


    ThomasRushton (10/19/2016)


    rodjkidd (10/19/2016)


    ThomasRushton (10/19/2016)


    In other news, today I overheard m'colleague saying "maybe the DBA team would be a beacon..."

    at which point I lost the plot.

    are you...

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

  • RE: ref integrity after Migrating database to sql server 2008 R2

    I think you have to set up the the RI in the SQL Server environment, not via your Access FE.....I may be wrong though

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

  • RE: How to get the maximum value per row?

    one way maybe...??

    CREATE TABLE #Counter

    (CKey INT,

    CA INT,

    CB INT,

    CC INT,

    CD INT,

    CE INT

    );

    INSERT INTO #Counter

    VALUES

    (1, 2, 3,...

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

Viewing 15 posts - 316 through 330 (of 2,452 total)