Forum Replies Created

Viewing 15 posts - 11,506 through 11,520 (of 13,469 total)

  • RE: Generate UNIQUE VARCHAR Identifier?

    you are on the right track as using an identity to help generate the varchar; that's the way we've suggested it for similar issues.

    like JKSQL said, the way to do...

  • RE: question, urgent please!!!

    here's an example:

    create table test (id int identity, category varchar(100),

    name varchar(100), allnames varchar(8000) null)

    insert test (category, name)

    select 'fruit', 'apple' union

    select 'fruit', 'pear' union

    select 'fruit', 'orange' union

    select 'meat' , 'beef'...

  • RE: some action before select

    the other important question is, how often does the remote data change? what is the time tolerence for the application(is it bad that the data is 1 min/10 min/1 day...

  • RE: some action before select

    it sounds like if someone runs a SELECT command, you want to make sure you have the "latest and greatest" data from remote servers/locations, is that right?

    instead of running yourstored...

  • RE: Modifying a stored procedure in a remote database using inline SQL statement

    just remove the GO just before the ALTER command:

    SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO

    changes to

    SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON

    i would simply pass the ALTER...

  • RE: selecting * while using distinct....

    excellent post by providing the table and data...thank you!

    The thing is, DISTINCT is used against all selected columns...so if you select * from 3 tables, you probably are not going...

  • RE: How to exit out ofa script if it fails Halfway during execution?

    in SSMS or Query analyzer, you can't...as you identified, the GO statements start a new batch, and you can't interupt the processing of the batches without raising an error severity...

  • RE: Create a Federated Table in SQL Server 2005

    a Federated Table is kind of neat in MYSQL: basically Federated tables are tables with storage in a remote server.

    The closest equivilent in SQL would be a view which points...

  • RE: Constraints to Check Database & Tabke Existence

    well the way to do it is to add a check constriant on the column, and the check contraint uses a user defined function:

    CREATE TABLE WHATEVER(

    WHATEVERID INT,

    DBNAME sysname CHECK(dbo.CheckDBName(DBNAME)...

  • RE: Execution results of stored procedure

    i missed that multple result part:

    to insert from a EXEC(storedproc), you have to know the columns that will be returned by the stored procedure...there's no wayt around that, so if...

  • RE: CASE Statement

    it's just a copy/paste error

    change

    Group by Select Case

    to

    Group by Case

  • RE: Execution results of stored procedure

    two ways, but you HAVE to know which column in my_table determines the order for the ORDER BY:

    I'm just assuming there is a TABLEID

    SELECT * FROM (

    select *, ...

  • RE: Read only?

    maybe the table was imported under a different schema/user, so you only have read rights to that schema?

  • RE: CASE Statement

    just use the other CASE syntax:

    select case

    when a.staff = 6 then 'EM'

    ...

  • RE: Create username and password for database dynamically

    sure it's fairly easy; adding a user has three things you need to do:

    1. Add a login.

    2. Add a user to that login

    3.decide what rights they get.

    Here is a script...

Viewing 15 posts - 11,506 through 11,520 (of 13,469 total)