Forum Replies Created

Viewing 15 posts - 13,321 through 13,335 (of 13,841 total)

  • RE: INSERT INTO With Condition

    Why not recast this as a conditional insert?

    if not exists (SELECT destination FROM filespath WHERE Destination = @a)

    begin

     INSERT INTO FilesPath (Path,Destination)

     VALUES     (@a,@b)

    end

  • RE: How can I call a script from a script

    Hi Bob

    Can you break the script into several stored procedures and then bring these all together in a master stored procedure?  Just use

    exec [procname]

    within a stored proc to execute another...

  • RE: Need Help ASAP!

    I reckon people would be more keen to help if you posted a copy of pornstar.mdb

    Under what circumstances does the error message appear?...

  • RE: how to tweak indexes?

    Watch out for the possibility that INSERT statements can add a row that has its clustered index value 'between' existing entries - possibly forcing a major rewrite of data on...

  • RE: Function for YTD calc in TSQL

    Hi Ray, just a quick comment on your response - your final query will, in fact, only return those orders that are placed at the same millisecond as the query...

  • RE: need Help in select query

    I would have thought that the GROUP BY clause would ensure that city5 would not be displayed 3 times - ** please test and post the results along with the...

  • RE: need Help in select query

    I'm having a bit of trouble working out what you want.  Is it something like this?

    select t1.city, t1.name, sum(no_of_games)

    from test1 t1

    join test2 t2 on t1.city = t2.city

    join test3...

  • RE: Reflexive Relationship

    By "reflexive", do you mean a self-join? If so, I agree with Phill Cart's response - just add the table again and Access will create an alias for it.

  • RE: Reflexive Relationship

    There is - use the SQL pane and write the query yourself.  Is that what you mean?

  • RE: Restoring Database with help of data files

    It is possible to restore without the log file - SQL Server should create a new log for you.  Are you working in EM or QA and exactly what is...

  • RE: SQL QUERY HELP!!! PLEASE!

    So you want to display the campaign count for the partner on the same row?  This is untested, but along the right lines - you will see that I have...

  • RE: Returning the length and IDs of recordsets

    Try this:

    SELECT MAX(LEN(isnull(COLUMN1,''))+LEN(isnull(COLUMN2,''))+LEN(isnull(COLUMN3,''))) FROM TABLE1

  • RE: How to work with updating of data

    It's a simple enough matter to put triggers on tables that you want to be able to do this for - to record 'date last updated' and 'updated by' for...

  • RE: Columns to table

    Suggest you import the spreadsheet into SQL Server "as is" and then normalise.  Your general approach should work though:

    insert into tblNormalised(date, offer, receipt)

    select date1, offer1, receipt1 from imported union

    select date2,...

  • RE: Looking for speed - streamlining procedure

    Surely the time difference here is due to the fact that SELECT INTO is writing to disk and SELECT is not?  How much data are we talking about?

Viewing 15 posts - 13,321 through 13,335 (of 13,841 total)