Forum Replies Created

Viewing 15 posts - 2,026 through 2,040 (of 2,894 total)

  • RE: Multiple count() in a single SQL

    siva 20997 (3/6/2012)


    #aTabale should be dataTable

    my find and repalce gave that problem

    here is the corrected code

    CREATE TABLE #a (id INT PRIMARY KEY, name VARCHAR(20), igroup INT)

    INSERT #a VALUES (1,...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Difference between two datetime fields taking account of weekends (at least!)

    Here how you can do it with calendar table:

    -- just small calendar table which has week_day's for 2012

    -- YOU WILL BE BETTER USING A PROPER ONE!

    select cdate, datepart(weekday,cdate) week_day_no, DATENAME(weekday,cdate)...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Difference between two datetime fields taking account of weekends (at least!)

    oops, can see your try now...

    Comments removed.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Query Identify Natural Primary Key Columns

    Gianluca Sartori (3/6/2012)


    Eugene Elutin (3/6/2012)


    If so, may be legacy DB2 database has some unique idexes?

    In my experience, DB2 on z/OS is often used without indexes and has "logical views" to...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: UNIQUE NOT NULL vs PRIMARY KEY

    Also, back to the question: UNIQUE NOT NULL vs PRIMARY KEY

    PRIMARY KEY term has the clear definition -it's contstraint

    But "UNIQUE NOT NULL" what do you exactly refer to?...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Query Identify Natural Primary Key Columns

    If so, may be legacy DB2 database has some unique idexes?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: UNIQUE NOT NULL vs PRIMARY KEY

    Much better now!

    So, what else we can add:

    1. they differ in purpose:

    We are using PK for referential integrity (when paired with FK)

    While UNIQUE NOT NUL index(key) we use...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: UNIQUE NOT NULL vs PRIMARY KEY

    deepikamm (3/6/2012)


    Thank you for your reply.

    Sqlservercentral is best place to post this question.

    Kindly help me out.

    Exactly right! Have you tried to google for the title you gave to the post?...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Select columns dynamically

    assefam (3/4/2012)


    For security reason( SQL Injection),Dynamic SQL is not allowed for me...

    If you use sp_executesql with parameters, there are no risks of SQL Injection and dynamic SQL is safe to...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Sorting in SQL Server

    Just an idea:

    CREATE TABLE [dbo].[MyTable](

    [id] [int] IDENTITY(1,1) NOT NULL,

    [realvalue] [varchar](50) NULL,

    [firstChar] AS (left([realvalue],(1))),

    CONSTRAINT [PK_MyTable] PRIMARY KEY CLUSTERED ([id] ASC)

    )

    GO

    CREATE TABLE dbo.SpecialCharSort (SpecialChar char(1), sortOrder int)

    insert dbo.SpecialCharSort

    values ('!',...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Nesting GO inside of BEGIN END statement (new procedure)

    guerillaunit (3/5/2012)


    I wanted to know if it was possible to subdivide the statements into separate scripts. But it sounds like it's not possible with the GO statement since it...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Fulltext search like search based on rules. Best Approach

    Please provide setup of data for each of the rule you've listed, so we can see exactly what your rules are.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to select values

    You don't need to set a variable @location for thing you are want to do.

    Create a UserLocation table which will hold all locations per user:

    -- just an example, you want...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Unicode

    Stefan Krzywicki (3/5/2012)


    I want to store currency symbols in a table. I checked the official unicode page[/url] for the unicode character codes for currency symbols. For example, the Euro symbol...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: convert rows into columns

    Cadavre (3/5/2012)


    chandarcst (3/5/2012)


    Hi

    I asked you Send the standard sql tutorial links suppose if you have.

    I have no idea what you want me to send you. What "standard sql tutorial"...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 2,026 through 2,040 (of 2,894 total)