Forum Replies Created

Viewing 15 posts - 12,676 through 12,690 (of 13,465 total)

  • RE: UPDATE from two tables

    since you are updating standard2, you should not have joined it: stop the query and do it this way;

    UPDATE    Standard2

    SET        Standard2.Current_County = ZipMkt06.County2

    FROM        zipmkt06 WHERE standard2.patzip = zipmkt06.zip

  • RE: script to generate db scham of all the databases in a sql server instance

    improved to include the column as well:

    select

    object_name(parent_obj) As TableName,

    syscolumns.name as Columnname ,

    sysobjects.name as DefConName from sysobjects

    inner join syscomments on sysobjects.id=syscomments.id

    inner join syscolumns on sysobjects.parent_obj=syscolumns.id and sysobjects.info =syscolumns.colid

    where sysobjects.xtype='D' --default...

  • RE: script to generate db scham of all the databases in a sql server instance

    I think this is what you are looking for: this is for a single database, you'd need to wrap this up for the sp_msForEachdb proc for every location on every...

  • RE: Help rewriting a not in query

    i don't see how/if A is related to b, but it is something like this i think: maybe left or right joins, you'd have to examine the actual data:

    select  a.[Value],...

  • RE: Script to get distinct data

    i kind of assumed that the uniqueness you wanted was firstname/lastname, so all other columns would be a min() or max(), unless those columns make the row the distinct -ness...

  • RE: Image Manipulation

    Hi Tim can you clarify... Is the question "create a thumbnail image from an image i have so I can either use the thumbnail or save it in the db?"...

  • RE: excel

    it looks like you have 12 fields you want to grab from 3 columns, is that right? so this is really ONE record with 12 fields?

    importing from excel , by...

  • RE: Email broadcast optimization

    i think it might have to do with the table variable;

     SELECT userid, fname, lname, toemail FROM users, @clientstable CT WHERE users.userid = CT.userid

    i would look at the execution plan, but...

  • RE: Email broadcast optimization

    minor, maybe do to a copy/paste/edit, but i think one variable is not declared, and another is never initailized:

    CREATE PROCEDURE [dbo].[proc_broadcastemailsget]

    AS

    DECLARE @clientstable TABLE (userid INT PRIMARY...

  • RE: Email broadcast optimization

    i guess what i was suggesting is that when you are looping thru the datagrid, I would have put the userid's that had checkboxes checked in their associated data row,...

  • RE: Script to get distinct data

    there's several ways...I would suggest a group by:

    SELECT ENO, Fname, Lname, MIN(Dept) as Dept, MIN(Start) as Start, MIN(End) as [End], MIN(Chngdate) as Chngdate FROM sometable

    group by ENO, Fname, Lname

  • RE: Exporting data to cvcs and txt issues with lengths over 255

    since you said DTS, I'm guessing you are using 2000, right.

    there's two issues I know of:

    the ole driver can have a default limit of 255 chars; see this thread on...

  • RE: Email broadcast optimization

     

    here's my suggestions, and they might be calling  for a design change:

    create a table something like what is below; i  would probably suggest putting their actual emails AND the newsletter...

  • RE: How to import and update a column at the same time?

    man i don't seem to read everything early in the morning:

    here is how to INSERT the new items from the staging table:

    INSERT INTO PriceDumpData(Company,Departure,Country,Destination,DepartureDate,ReturnDate,UpdateDate,DepTime,RetTime,Hotel,Link,Roomtype,Classification,Duration,Price,Currency,Link2)

    SELECT

    PriceDumpStage.Company,

    PriceDumpStage.Departure,

    PriceDumpStage.Country,

    PriceDumpStage.Destination,

    PriceDumpStage.DepartureDate,

    PriceDumpStage.ReturnDate,

    PriceDumpStage.UpdateDate,

    PriceDumpStage.DepTime,

    PriceDumpStage.RetTime,

    PriceDumpStage.Hotel,

    PriceDumpStage.Link,

    PriceDumpStage.Roomtype,

    PriceDumpStage.Classification,

    PriceDumpStage.Duration,

    PriceDumpStage.Price,

    PriceDumpStage.Currency,

    PriceDumpStage.Link2

    FROM

    PriceDumpData

    FULL OUTER JOIN...

  • RE: How to import and update a column at the same time?

    here is the same logic, but with the actual columns you identified: assuming you import  the text file into the staging table PriceDumpStage , this will work:

     

    SELECT

    PriceDumpData.*,

    PriceDumpStage.*

    FROM

    PriceDumpData

    FULL OUTER...

Viewing 15 posts - 12,676 through 12,690 (of 13,465 total)