Re: Separate values from column



On Mon, 24 Oct 2005 09:56:08 -0700, Mile wrote:

>I working with SQL Server 2000 table called dbo.test.
>I need to separate value "User Name:xxx" that are in one column named "log"
>that are space limited.
>For example I have a column called log and the
>value = 'domain: User Name:user1 User Name:user2 User Name: User Name:user3'.
>I want to write a query so that the results can found just User Name with
>actuell user (Ex."User Name:user2") not the User Name without actuell user
>(Ex. User Name:).
>When the "User Name:xxxx" is separated then the actuell user (xxxx)must be
>checked if same name is repeated more than 3 times last 24 hours
>then I would like to insert the output in new table caled"Result"
>Thanks!

Hi Mile,

I'm sorry, but the above description doesn't clarify what you're trying
to achieve. Maybe it would help if you could post:
* Structure of your table (as CREATE TABLE command, including all
constraints and properties; irrelevant columns may be omitted);
* Some well-chosen rows of sample data (as INSERT statements);
* The required results, as based on the given sample data.

Check out www.aspfaq.com/5006 as well.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
.



Relevant Pages

  • Re: Query for search engine
    ... > relational database and is not restricted to SQL server. ... > our internet site and SQL for our intranet sites. ... >> Could you please post some DDL, sample data and expected result? ...
    (microsoft.public.sqlserver.programming)
  • Re: Auto Number
    ... Please post DDL, so that people do not have to guess what the keys, ... constraints, Declarative Referential Integrity, datatypes, etc. in your ... Sample data is also a good idea, ... two column key. ...
    (microsoft.public.sqlserver.programming)
  • Access SUMs Full Column When Using Subquery
    ... I jumped over to SQL Server, and it gave me the results I wanted, so ... Sample Data: Students_02272005_1 ... SELECT clause due to conditions specified on the subquery's WHERE ... Stud_ID Lesson PercentAbove5 ...
    (microsoft.public.access.queries)
  • Re: Need Case Based Query for This Situation
    ... Please post DDL, so that people do not have to guess what the keys, ... constraints, Declarative Referential Integrity, datatypes, etc. in ... Sample data is also a good idea, ...
    (microsoft.public.sqlserver.programming)
  • Re: join on 3 tables for asp output
    ... The table structure and sample data is ... >> Mondays since I am scheduling instruments for a whole week. ... > some outer joins (I'm assuming this is SQL Server, ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)