TRY..CATCH

Technical Article

RE: Sequential Numbering

  • Reply

Another way to do this is using Indentity, not using it as a property of a column, but as function in a TSQL statement. Using your example: select Identity(int,1,1) as rank, Hiredate, LastName, Firstname into #hireDate from northwind.dbo.employees where Title = 'Sales Representative' order by HireDate Select cast(rank as char(4)) as Rank, cast(hiredate as varchar(23)) […]

You rated this post out of 5. Change rating

2003-12-08

Technical Article

RE: Code to Format Numeric Data?

  • Reply

Something like this developed into a function might do the trick. Ex. DECLARE @var varchar(40) declare @tempVar varchar(40) set @var = '48501239955.486' set @tempVar = rtrim(ltrim(reverse(@var))) select @var = reverse(left(@tempVar,charindex('.',@tempVar))), @tempVar = right(@tempVar,len(@tempVar) - charindex('.',@tempVar)) while len(@tempVar) > 3 begin select @var = ',' + reverse(left(@tempVar,3)) + @var, @tempVar = right(@tempVar,len(@tempVar) - 3) end select […]

You rated this post out of 5. Change rating

2003-06-26

Technical Article

RE: Security Methodology Using Roles

  • Reply

the statement made that 'developers can't be trusted' is irresponsible - and is an example of what is wrong with a lot of the cost of doing business in the software industry lately... when industry is chock-full of prima-dona attitudes about who-did-what and the spirit of teamwork gets blown away with statements such as these […]

You rated this post out of 5. Change rating

2003-06-25

1 reads

Technical Article

RE: Enjoying QOD

  • Reply

Thanks! There's a standings page that's half complete :). You can see it on the QOD homepage under Your Scorecard. Once there's enough points to really weigh people out there, I'll create a true standings page so people can see how they rank. The harder the question, the more points you get. Brian Knight bknight@sqlservercentral.com […]

You rated this post out of 5. Change rating

2003-06-22

1 reads

Technical Article

RE: privilege to run bcp

  • Reply

If you're planning to use QA then the user need permission to exec. xp_cmdshell otherwise just the appropriate permissions to write data. for bulk insert: Your user has to be a member of the "Bulk Insert Adminstrators" role which is a server wide role Refer to "Bulk Insert" section "permissions" on BOL MW Edited by […]

You rated this post out of 5. Change rating

2003-06-13

2 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