Forum Replies Created

Viewing 15 posts - 436 through 450 (of 548 total)

  • RE: weekday function

    So how do you know that 1753-01-01 is a Monday? My guess is that you used DATEFIRST.

  • RE: SUM Not working

    If you try this

    create table t(i int)

    insert into t values(null)

    insert into t values(1)

    select sum(i) from t

    You get 1.

  • RE: weekday function

    Play it safe - wherever you are in the World! Whenever I deal with datepart(dw,...) I capture what it returns for a known date and take it from there. For...

  • RE: Optimizing a simple pivot

    Nothing wrong with that second join. But if you really insist, this is a way to do it.

    create table files

      (

      fid int,

      fname varchar(30)

      )

    insert into files values(1,'file1')

    insert into...

  • RE: OpenRowset with Microsoft Access

    So who is running the show? Who is accessing what?

    If I'm logged in as a domain administrator and fire up Query Analyzer, login with a SQL Login (that happens to...

  • RE: OpenRowset with Microsoft Access

    I even changed the user/password of the MSSQLSERVER service to a domain administrator and am still getting the same problem as Philipp. Very strange indeed.

  • RE: Require data to read from Excel file and stores in SQL Server through DTS

    I have just played around a bit with importing Excel data.

    The essential bit on the SQL Server side of things is this piece of code:

    select * from openrowset('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=c:\tmp\Book1.xls',test)

    But be...

  • RE: Query to replace NULLS with value from previous record

    And what should happen when all rows contain <NULL>?

    To get what you want, every row has to link with all previous rows to find the first non <NULL> entry. And...

  • RE: USE DB with a variable

    Indeed! The BOL doesn't say that the dbid parameter is optional. And I never thought about just leaving it out to get at the current db name. Thus my convoluted...

  • RE: USE DB with a variable

    While on the topic, sometimes you want to know what database you're in:

    declare @dbname varchar(30)

    set @dbname=(select d.name

                 from master.dbo.sysprocesses p,master.dbo.sysdatabases d

                 where p.spid=@@spid and p.dbid=d.dbid)

  • RE: entering pictures into a table

    I think the key is to go via a file. The FileToBlob routine can then be used to get it into a table. It is VB6 compatible.

    The VB6 Picture control...

  • RE: SELECT Question

    Great! And when you have finished writing the SP, publish a copy of it on this thread. Maybe then we'll finally understand the problem you are trying to solve.

    What is amazing...

  • RE: entering pictures into a table

    Agree with Mark regarding 'last referenced field'. It's a bug somewhere in the ADO and/or MDAC layer.

    The attached VBScript code should get you in the right direction especially in regards to...

  • RE: SELECT Question

    Be more specific, please! What do you mean by 'calculate them'?

    On second thought, I haven't got a clue as to what your problem is.

  • RE: How to solve this problem with numeric data

    If 'real' does that, that's really cool.

Viewing 15 posts - 436 through 450 (of 548 total)