Forum Replies Created

Viewing 15 posts - 1,981 through 1,995 (of 2,171 total)

  • RE: Problem with fixed-length column query from Oracle from SQL server

    What is to_char function?

    The Select from Dual statement is run on Oracle, not SQL. Thus can't column be used in a SQL function then, but first when returned to SQL...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Speeding up Post code search query

    Begin with creating a function for calculating the distance between two coordinates, like this

    CREATE FUNCTION dbo.fnPostalDist

    (

        @Lat1 FLOAT,

        @Long1 FLOAT,

        @Lat2 FLOAT,

        @Long2 FLOAT

    )

    RETURNS FLOAT

    AS

    BEGIN

        DECLARE @Dist FLOAT,

                @Rad...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Speeding up Post code search query

    Yes. If the two databases are installed on the same database server, use fully qualified name to get the data.

    MyDatabase.Owner.Table.Field -> Master.dbo.spt_Values.Number

    If the data exists on a different...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Speeding up Post code search query

    The shear amount of data transfered from the database to the web page exceed 36 mb!

    Multiply that with the number of concurrent users and you most probably will congest the...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Empty Inserted Table

    CREATE TRIGGER ProposalCC ON Proposal FOR UPDATE AS

    DECLARE @Count INT

    SELECT  @Count = COUNT(*)

    FROM    INSERTED

    IF @Count > 0

        BEGIN

            INSERT CC

            VALUES...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: osql -b return ERRORLEVEL but "for do ()" cleans it!

    I think once that you have referenced %ErrorLevel%, it is automatically set to Zero as it is very volatile.

    Try to save %ErrorLevel% first with

    Set a = %ErrorLevel%


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Empty Inserted Table

    You are only fetching first updated record. What if a user updated two or more records at the same time?

    Try this code for trigger

    CREATE TRIGGER ProposalCC on Proposal...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: VERY URGENT...How to find employee having experience>250 months

    Yes, but it will not utilize any indexes. John's query will.


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: problem using MAX on date

    Books Online states that SMALLDATETIME is only accurate to the minute.

    Are the calls in the database also stored as SMALLDATETIME? IF so, changing to DATETIME for getting latest call is...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: how to insert date in the query result?

    Yes Ryan. Of course I am right. Have I ever lied to you?

    Use this code. Also tell Madhivanan to add this code to...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: using parameters on QA

    declare @param varchar(50)

    select @param = 'abc'

    select reference,quantity from sl where sl.code = @param

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: how to insert date in the query result?

    Yes, if you name the sheet or a range in the sheet, Excel automatically adds the new rows at the first free row below existing. If no free rows are...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Search entire database for date fields

    Yeah, I know this would come up. Jeff, if you already know which columns to update, write them down and update them one at a time. If you want to...


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: how to insert date in the query result?

    It is possible with OPENROWSET. Read http://sqljunkies.com/WebLog/madhivanan/archive/2005/07/27/16233.aspx

     


    N 56°04'39.16"
    E 12°55'05.25"

  • RE: Search entire database for date fields

    Yes Jeff...

    declare @columns table (id int identity(0, 1), tablename sysname, columnname sysname)

    insert     @columns

               (

                   tablename,

                   columnname

               )

    select     isc.table_name,

               isc.column_name

    from       information_schema.columns isc

    inner join information_schema.tables...


    N 56°04'39.16"
    E 12°55'05.25"

Viewing 15 posts - 1,981 through 1,995 (of 2,171 total)