Forum Replies Created

Viewing 15 posts - 31 through 45 (of 49 total)

  • RE: Passing a resultset from one SP to another

    I've passed temp tables between nested PROCs... but ya got to use global temp tables.. ##tbl_1 (two # signs required)

     

    Proc_A

             ... do stuff..

             EXEC Proc_B  (which creates and populates...

  • RE: SELECT in Stored Procedure

    Try this:

    SELECT dt.SalesOrderNumber

    FROM (select

       BarCode, SalesOrderNumber

      from tblSales1

      UNION ALL

      select

       BarCode, SalesOrderNumber

      from tblSales2

    ) dt

    where dt.barCode = @barCode

    The UNION ALL does not weed out duplicate rows and is not as...

  • RE: Date formats and complicated stuff :-(

    Try this out...

    -- drop table #TestTimes

    CREATE TABLE #TestTimes (UID INT Identity(1,1) NOT NULL,

             CreateDate DateTime NOT NULL) ON 'PRIMARY'

    DECLARE @Today DateTime,

      @i int

    SET @Today = GetDate()

    SET @i = 1

    WHILE @i <...

  • RE: Date formats and complicated stuff :-(

    Following up on Stwart's comment regarding the time element of DateTime values, unless I actually NEED the time portion on a date value I always compare date values using one...

  • RE: Display Last Record

    Just so we cover all the options... try this:

    create table #a (uid int identity not null,

          EntryDate datetime not null default getdate(),

          UsrName varchar(30) not null ) on 'Primary'

    INSERT INTO #a

    (UsrName)

    VALUES ('Bill')

    INSERT...

  • RE: how to zip file

    You can also use a freeware product that someone sent to me this week, 7-Zip.

    It has a command line interface too as well as a GUI.  There seems to be...

  • RE: Bulk Inserting Fails when using share drive as source???

    Seems like there was an issue when using mapped drives in DTS Pkgs that are then run via a Job.

    See KB article - INF: How to Run a...

  • RE: Run-time Error -2147467259

    The error messge you're getting has to do with a Database connection error.

    I had a similar problem a few years back.. and it turned out being some kind of WINS/DNS...

  • RE: Data Modeling Question

    Sounds like you've already gotten some good advice.  I would suggest that you might want to make your Broker & Assistant tables date sensitive, i.e., with a StartDate and EndDate. ...

  • RE: help with rewriting query (performance optimization)

    Sorry 'bout that.. I changed the name of the fields while I was writing.. you should use

    TotalHours = dt.Hrs,

    etc.. etc.. 

    Just see what I called the columns in...

  • RE: help with rewriting query (performance optimization)

    I'm not quite sure about what all is in your tables.. but Phill is correct.. avoid the correlated subqueries.. go for derived tables instead.

    Sometimes (for debugging), it's helpful to just...

  • RE: temporary table creation

    Besides the locking issues already mentioned, I've found that I'll sometimes get odd table structures by using SELECT INTO - especially where numerics are concerned.  It's been awhile since I've...

  • RE: NTFS Rights For Reporting Services Virutal Directories

    Just a guess.. but try removing the EVERYONE group and adding AUTHENTICATED USERS

    - Mark

  • RE: Need help Totaling rows and columns

    Try this:

    CREATE TABLE #SSA ([MachineID] [int] IDENTITY (1, 1) NOT NULL ,

           [Location00] [varchar] (30) NOT NULL ,

          CONSTRAINT [PK_SSA] PRIMARY KEY CLUSTERED ([MachineID]) ON [PRIMARY]

         &nbsp

  • RE: vb function in SQL

    I don't think you can use VB functions in an MS Access query, but you might be able to use VBA functions.  Which functionality are you trying to achieve?

    As far...

Viewing 15 posts - 31 through 45 (of 49 total)