Queries

Technical Article

RE: switching off the identity on a column

  • Reply

I get the same error, can't find in BOL why the syntax error. Anyway, what about this: -- First add an identity column... ALTER TABLE MyTable ADD MyNewIdentityColumn INT NOT NULL IDENTITY(1,1) GO -- Next, throw the old values into the new identity column UPDATE MyTable SET MyNewIdentityColumn = MyOldIntColumn GO -- Next, drop old […]

You rated this post out of 5. Change rating

2003-06-17

Technical Article

RE: Create multiple temp tables

  • Reply

Crispin, thanks. Is there any way to return the name of each of these tables, per user? E.g., if user A created a temp table (the longer life type), how would I be able to reference it in a select statement for example? Thanks

You rated this post out of 5. Change rating

2003-06-17

Technical Article

RE: What makes a good developer?

  • Reply

Frank, Never thought about it that way... One question though ... What is the best program : 1. a perfectly written program, written with the best design methodology, with optimal performance, making use of the best technology for the job, taking into account all the pitfalls of the language, having a high degree of readibility […]

You rated this post out of 5. Change rating

2003-06-16

1 reads

Technical Article

RE: return value from exec(string)

  • Reply

The example I gave was not the best in that it immediate brought up questions of why I was trying to generate the key in that way in the first place. The situation is more one of coming into a place where they keys are generated in this way, but for each table and I […]

You rated this post out of 5. Change rating

2003-05-22

2 reads

Technical Article

RE: Variable where clause

  • Reply

create procedure MySP @var varchar(20) = null as if @var = null Select * from news_items else Select * from news_items where division = @var Steve Jones sjones@sqlservercentral.com http://qa.sqlservercentral.com/columnists/sjones www.dkranch.net

You rated this post out of 5. Change rating

2003-05-20

Technical Article

RE: cast varchar as datetime

  • Reply

Hi 5409045121009, I tried the function you mentioned, and modified it a little so that it gave me the whole string and it worked. CREATE FUNCTION MyStrip1(@v varchar(50)) RETURNS Varchar(50) AS BEGIN Declare @vv Varchar(50) Set @vv=Right(@v,DataLength(@v)) RETURN Left(@vv,DataLength(@vv)) END Problem though is that it is returning it as a varchar value. I need to […]

You rated this post out of 5. Change rating

2003-05-16

Technical Article

RE: changing dates on one instance/database

  • Reply

Not the best, but seems to be working. CREATE VIEW Test as Select DateAdd(hh,2,GetDate()) as TheDate GO CREATE FUNCTION TestDate() Returns @TheTable TABLE ([GETDATE] DateTime) as BEGIN Insert @TheTable Select TheDate From Test RETURN END GO CREATE FUNCTION TestDateII() Returns DateTime BEGIN RETURN (Select [GetDate] from dbo.TestDate()) END GO Select dbo.TestDateII() GO Suspect the overhead […]

You rated this post out of 5. Change rating

2003-05-15

Blogs

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...

Snowflake + Azure blob

By

Let’s go back to data platforms today and I want to talk about a...

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