Forum Replies Created

Viewing 15 posts - 61 through 75 (of 345 total)

  • RE: SQL to Access conversion

    I don't see that the temp table, table variable, or calculations are actually doing anything.

    Seems to me the above can be rewritten as

    SELECT

    @a as NUM,

    bd.DQLinkID as bdDQLinkID,

    bd.DQID...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Extract data from 200 identical tables

    You can use something like this to generate the sql:

    create table table_01 (id int);

    create table table_123 (id int);

    create table table_554 (id int);

    insert into table_01 values (2), (200);

    insert into table_123 values...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Query to return from 2 unlike tables with 3rd table linking like info.

    Your sample query has columns not listed in your table columns, i.e. Step, CurrentStep.

    It seems the natural way to join the tables would be

    select jd.Jobnum, jd.TimeStart, jd.Stepnum, jd.tgtQName, a.RunInSingleMode...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: UNION ALL

    To create a temp table from existing rows, use this type of syntax:

    select Customer_Number,Product, Price

    into #temp_Customer

    from RealCustomerTable

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Chagne Database Physical File name

    Dev (12/28/2011)


    george sibbald (12/27/2011)


    logicinside22 (12/27/2011)


    thanks folks for nice reply . I did with Detach and Attach Option and it looks good now.

    can I then recommend that you check...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Timed Out when calling from VBA function

    Something to try: place SET NOCOUNT ON; after procedure declaration.

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Need help joining two tables without common key

    tharan.info (12/28/2011)


    This will help you,

    update A SET A.DID='X'

    from

    LOCN A

    join

    ACS B

    On

    A.LID = B.LID

    JOIN

    ACO C

    ON

    B.UID = C.UID

    where

    C.TYPE = 'd'

    How...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Creating a sum column without losing records

    Awesome. Thanks Jeff, everytime you post, I learn something. Next lesson for me: windowing functions.

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Creating a sum column without losing records

    bwoulfe (12/20/2011)


    Is that the same thing? Does the cross apply act as a inner join because of where OrderNumber = o.OrderNumber?

    Don't think of it as a join but instead...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Error converting data type varchar to numeric.

    Also, this article can give you some insight on how isnumeric works and what pitfalls to avoid.

    http://www.sqlservercentral.com/articles/IsNumeric/71512/

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Error converting data type varchar to numeric.

    It's bad data. You have a character that passes for numeric but cannot be inserted into a numeric field. Examine:

    select isnumeric('$00')--returns 1, is numeric according to the function

    select cast('$00' as...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Error converting data type varchar to numeric.

    kajalchatarjee 5928 (12/21/2011)


    ...

    I did check the data but there was no error... because , when I take two sample sets of data and try inserting together it is giving that...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Error converting data type varchar to numeric.

    kajalchatarjee 5928 (12/21/2011)


    Hello All,

    I am new to sql server. I am getting following error when I am trying to insert data into target table.

    "Error converting data type varchar to numeric."

    so...

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: sql query > phpfile > cron timer ???

    Do the owners of this 198k-member website realize how much trouble they're in? :unsure:

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

  • RE: Creating a sum column without losing records

    Skinning cat method #2:

    select * from #orders o

    cross apply (

    select OrderNumber, SUM(total) OrderTotal

    from #orders

    where OrderNumber = o.OrderNumber

    group by OrderNumber) a

    ______________________________________________________________________________
    How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.

Viewing 15 posts - 61 through 75 (of 345 total)