SQL

Technical Article

RE: How to Determine Whole Dollar Amount

  • Reply

I'm trying to SELECT all records where the Amount is a whole dollar.  I need to exclude all records where the Amount field contains cents.  Using Dinakar's suggestion:SELECT * FROM Sales WHERE CAST(Amount AS int) = Amountappears to give me what I need.  I just need to verify that this is the correct syntax to […]

2005-05-26

Technical Article

RE: help with date parameters

  • Reply

Using the DATEPART function will not allow the optimizer to use the index on the reortsentdate column so your statement will force a table scan.For more info on how to work with sql server dates you might want to look at these articles: http://www.sql-server-performance.com/fk_datetime.asp http://www.karaszi.com/SQLServer/info_datetime.asp

2005-05-25

Technical Article

RE: DTS Package Object Model

  • Reply

ok, here it is: Its not perfect, but it works.This is part of my code, so let me explain.  The important stuff is highlighted.  You have to get a hold of your Task object from the particular package object that contains the TransferObjectTasks.  One bad part that I can't figure out is how many objects there […]

2005-05-24

Technical Article

RE: how to zip file

  • Reply

OK.  Makes perfect sense.  Thanks for the 411.  I'll take this under advisement and look into scripting more of my tasks whenever possible.  LanMan

2005-05-24

Technical Article

RE: Arguments for using SQL server

  • Reply

And many things in file-based systems, like definite record numbers, simply do not exist in SQL server (and for good reason - it's a set of data.  If you want it ordered, use an order by).Also...  many of the systems like Fox/Access use cursors a great deal - server side cursors are usually the substitute […]

2005-05-24

Technical Article

RE: dynamic sql vs. clustered index scan

  • Reply

Or you could keep your static SQL but rather than make use of your charindex statement, which cannot use any indices, you can use a UDF that returns a table. For example, this UDF will take a comma separated list of integers as a string and returns a table (I think I got this from […]

2005-05-24

Technical Article

RE: Notification on update

  • Reply

Hi Amit, Given the following details could you please quickly put together a trigger to send the last added name. I plan to use xp_sendmail but still trying to configure the MAPI.UserID int 4 UserName nvarcahar 50 Password char 10 EMailAddress nvarchar 50Table name = Users SQL Database = EUTScheduleThanks in advance.     

You rated this post out of 5. Change rating

2005-05-22

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