ssas

Technical Article

RE: Is This possible to do ?

  • Reply

Well I finally got it to work with the help of a co-worker...here is the code  previous_discharge_date  = (SELECT MAX(ISNULL(referral_ref.dischargedate, '')) as previous_discharge_date     FROM      referral as referral_ref     WHERE      referral_ref.dischargedate  <>'2078-12-31 00:00:00'      AND referral.memid   = referral_ref.memid), I was making it way more complex than it needed to be... Thanks to everyone for the help Leeland

You rated this post out of 5. Change rating

2005-04-22

Technical Article

RE: Making a copy of a sql table within same DB

  • Reply

Are you actually dropping the original table? In the "Select into" you get all the data. As long as you don't drop the original table, if you want to back off the the import, you would just do: TRUNCATE TABLE TableName GO INSERT INTO TableName SELECT * FROM NewTableName GO The indexes, keys etc. should […]

You rated this post out of 5. Change rating

2005-04-11

Technical Article

locking?

  • Topic

I need to delete millions of rows from a table older than x days. I broke this up into smaller delete batches like the following.SET ROWCOUNT 1000 WHILE 1 = 1 BEGIN    delete from events         where datediff(day, EVENT_DATE, getdate()) > 10    IF @@ROWCOUNT = 0         BREAKENDSET ROWCOUNT 0Would this lock the table at […]

You rated this post out of 5. Change rating

2005-04-11

7 reads

Technical Article

RE: T-SQL query from a cube to the datasource database.

  • Reply

the following article could possibly help (it's about using AS and RS, look towards the end re: actions) but will depend a little on how dynamic you need to query.  If it's only ever going to return customers etc, then this may work for you.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/olapasandrs.asp steve.

You rated this post out of 5. Change rating

2005-02-20

Technical Article

RE: configuration for server

  • Reply

print 'Free Space' print '----------' exec master.dbo.xp_fixeddrives print 'Memory' print '------' exec master.dbo.xp_msver print 'Database Configuration' print '----------------------' exec master.dbo.sp_configure print'DB Size' print'-------' exec master.dbo.sp_databases print 'Linked Servers' print '--------------' exec master.dbo.sp_helplinkedsrvloginprint 'Windows info' print '------------' exec master.dbo.sp_server_info

You rated this post out of 5. Change rating

2005-02-16

Technical Article

RE: SQL to trigger an ASP file

  • Reply

Triggers do not monitor data.  They only run on table for an insert, update, or delete transaction.Can you explain what the table holds?Is it a table that holds a single row of configuration data or is it the "timetoSend" column hold values for multiple rows?

You rated this post out of 5. Change rating

2005-01-27

Technical Article

RE: DayName / Date -- Please HELP !

  • Reply

Select datename (dw, Entrydate) as 'Day of week' , count(OrderNo) as NumberFrom [order-header]Where (SUBSTRING(source, 1, 8) = '223WHOLE')and EntryDate bewtween  '20040101' AND '20041231'  GROUP BYdatename (dw, Entrydate)

2005-01-23

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