ColumnStore Index

Technical Article

RE: Update a table and display value

  • Reply

I'm a little confused by the terminology of the question. As written above to actually return the value of intcount to a process outside the statement a third statement would be needed:     select intcount from table1 where loc = 'A' after it has been updated.The statementupdate table1 set intcount= intcount +1 where loc='A'will increment the value of intcount by […]

You rated this post out of 5. Change rating

2004-06-21

Technical Article

Reading image data

  • Topic

This SQL statementSELECT     MAX(DISTINCT ProductVersion) AS New, ProductType, ProductDesc, CAST(ProductLogo AS varbinary) FROM         eProducts GROUP BY ProductType, ProductDesc, ProductLogo     gives me this errorServer: Msg 306, Level 16, State 2, Line 1 The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.How can I retrieve […]

You rated this post out of 5. Change rating

2004-06-17

2 reads

Technical Article

RE: I HAVE A SERIOUS PROBLEM

  • Reply

Hi,You can use @@IDENTITY to obtain the inserted ID value:  INSERT INTO MASTERTABLE(val1,val2)Values('hello','world')declare @MyID intSelect @MyID = @@IDENTITYINSERT INTO CHILDTABLE(ForeignKey,val1)Values(@MyID,'value') Good Luck  

You rated this post out of 5. Change rating

2004-05-20

Technical Article

RE: Constraint Questions

  • Reply

- use decimal[(p[, s])]  check BOL in stead of float.- check constaints can help to delimit values :   from BOL :      ALTER TABLE doc_exd           ADD CONSTRAINT exd_check CHECK (column_a between -99 and +99)      alter table dox_exd              ADD CONSTRAINT exd_check_precision CHECK (case column_a - cast(column_a as integer) when  0 then 1 when 0.5 […]

You rated this post out of 5. Change rating

2004-04-20

Technical Article

RE: INSERTING IN TEMP TABLE THRO DYNAMIC SQL

  • Reply

When you create a temporary table it is in scope for either the duration of the batch (Local Temporary Table) or for the duration of the connection (Global Temporary Table.)A Local Temporary Table is identified by a single pound sign (#TempTable). A Global Temporary Table is identified by a double pound sign (##TempTable).Since dynamic SQL […]

2004-03-03

Technical Article

Searching Stored Procedures

  • Topic

I'm trying to build a procedure to search all stored procedures in the Db for a text string.  What tables contain the text of the procedures and how to construct it.  I get sysobject name but it doesn't have the text.  Any assistance would be appreciated.   

2004-02-26

6 reads

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers