Forum Replies Created

Viewing 15 posts - 466 through 480 (of 1,048 total)

  • RE: get lookup data

    sqlsdev (6/3/2013)


    Sorry... Here is the table structure

    I have two tables, lets say Table 1 and Table 2 as below

    Table 1:

    Col1 Col2 Col3

    1 _A 11

    2 _B 12

    3 _C 12

    4 _A 11

    Table...

  • RE: Error

    Restart the SQL Server

  • RE: get lookup data

    Try this:

    SELECT T1.Col1, T1.Col2, T2.Val

    FROM table1 T1

    INNER JOIN table2 T2 on T1.col2 = T2.ID

  • RE: COALESCE

    Good question chirag 🙂

    thanks

  • RE: need help on sql script

    Just change the order of the table creation as per suggested by the experts 🙂

  • RE: Add New column and Update column in same script!

    Luis Cazares (5/30/2013)


    Use a batch separator (a.k.a. GO).

    This will help you unless you're using the query inside a SP.

    +1 🙂

  • RE: IDENTITY_INSERT, and Using Alphanumeric Autoincrement Primary Key

    Hi,

    As per my concern we can not apply identity property on alphanumeric field.

    to set the identity property on you have to use like this,

    SET IDENTITY_INSERT table_name ON/OFF

  • RE: Storing XML data

    I learn it from the article: 🙂

    http://www.sqlservercentral.com/articles/XML/71659/

    If someone else also want to learn this then please refer this link.

  • RE: Funnies on Views???

    dan-572483 (5/28/2013)


    How about in a WHERE EXISTS clause?

    According the the Querying SQL2012 exam prep book, a SELECT * inside an EXISTS clause returns true or false only - not all...

  • RE: Converting a old .sql to new

    Lynn Pettis (5/28/2013)


    Not sure, but this looks like it may be for MySQL not MS SQL Server. I don't have the time to look harder at the moment as...

  • RE: SELECT INTO FILESTREAM

    Dineshbabu (5/29/2013)


    I don't have idea about filestream but i'm sure other than IDENTITY property no other attributes will be copied to new table. So i guessed it should be varchar(max)...

  • RE: Use of Key Column

    Good question Mahmood 🙂

  • RE: Query Help

    Aadhar Joshi (5/27/2013)


    If u'r facing problem with insertion see below demo.

    DROP TABLE #temp

    Create table #temp

    (

    ID int identity(1,1),

    ActivityName varchar(max),

    ApplicationName varchar(100),

    ActivityDate datetime2

    )

    Insert into #temp

    Values

    ('Successfully Login into Dynamic Portal Application','Login',CAST('2013-05-20 13:22:21.000' AS DATETIME2))

    I...

  • RE: Query Help

    I have change structure of a table and added one more column. Now plz help me in achieving that output

    Create table #temp

    (

    ID int identity(1,1),

    ActivityName varchar(max),

    ApplicationName varchar(100),

    ActivityDate datetime

    )

    Insert into #temp

    Values

    ('Successfully Login...

  • RE: having problem in creating table from another table

    abhishekagrwl25 (5/27/2013)


    i have to do it dynamically..

    you can make use of PIVOT for this..........

Viewing 15 posts - 466 through 480 (of 1,048 total)