all groups > sql server programming > december 2005 > threads for sunday december 11
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Extract MonthName
Posted by Scott at 12/11/2005 9:18:43 PM
Is there a way to get the 3 digit month name like Dec from GETDATE() or any
date?
... more >>
is there a way to caching the result in a SP?
Posted by Skywalker at 12/11/2005 7:08:35 PM
Hi All,
I am not sure if SQL200 or SQL2005 has cache function which can store the
query result into cache.
I have a large table T1 (C1, C2,...C20) with multi-million records and need
to do a report from it per hour.
Select C1,C2,C3, sum(C20),sum(C19) from T1 group by C1,C2,C3
Most of... more >>
Date Where Question
Posted by Scott at 12/11/2005 6:56:30 PM
To get just the date part of a field and test against a date variable, I
usually use syntax like the below example. It gives me correct results, but
I wanted to know if there was a better, more efficient way to just get the
date part from a field that may be just a date or contain date and tim... more >>
How do I handle single quotes in data fields
Posted by Ashhad Syed at 12/11/2005 5:21:02 PM
I want to set company name in table company to "Don's Autoworks". When I run
a simple query:
update company
set company_name = 'Don''s Autoworks'
where id = 125
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 's'.
However, select queries with 2 single quotes li... more >>
Running VBScript from an SQL Server Stored Procedure
Posted by chris.kernaghan NO[at]SPAM gmail.com at 12/11/2005 5:18:17 PM
Hi,
I would like to store VBScripts either within a SQL Server database
table or from within Stored Procedure.
The VBScripts are used for basic administration tasks, and by storing
them in the database would make them more portable between customers as
it removes the necessity of a creating... more >>
Using Triggers
Posted by Roy Goldhammer at 12/11/2005 4:51:56 PM
Hello there
I have table1 that has Insert trigger who insert some data to table2.
Table2 has an insert trigger that chack the validation of tne new data.
If the new data on table2 is invalid it do ROLLBACK TRAN and it cancel the
insert trigger of table2.
How can i make sure that the in... more >>
Dynamic Quote Problem
Posted by Scott at 12/11/2005 4:17:24 PM
I'm trying to insert a quarter and year variable in CODE (BAD) section below
in a dynamic sql statement from Northwind. I'm trying to make CODE (BAD)
look like CODE (GOOD) section. I'm having trouble getting the correct quotes
around the @YearName and @QtrName1 part in CODE (BAD) section.
C... more >>
4 Table select statement?
Posted by ARTMIC at 12/11/2005 12:56:03 PM
Hello can anyone help me out with an sql statement.
I have an order table, which has 4 tables below it, which hold things that a
user can order.
Orders(table)
Then this order table above is linked to the 4 product tables.
ProductA(table)
ProductB(table)
ProductC(table)
ProductD(table)... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SMO + remote
Posted by christof at 12/11/2005 12:36:00 PM
I've got one problem:
I wish to use SMO, but the SQL instance is not local, but remote.
I'm giving the IP address in a connection string like that:
Lets use 123.123.123.123 as some stupid example IP
"Server=123.123.123.123,1433;Net=dbmssocn;User ID....";
It works fine, I've got an estab... more >>
inserting text after a certain record of a recordset
Posted by dabootleg NO[at]SPAM gmail.com at 12/11/2005 11:15:40 AM
What I'm trying to accomplish is to add some text after the 5th
dispalyed record of a recrod set, I tried using absolute position and
the following:
<%
if rs.absoluteposition = 5 then
Response.Write "Testing"
end if
%>
I'm probably missing something or there is some... more >>
GROUP BY syntax
Posted by shank at 12/11/2005 9:33:56 AM
I'm trying to group rows in ItemKey to produce a sum total of prices. Then
update ItemKeyprice. The select statement works, but I get the below error.
Where is my syntax wrong?
thanks
UPDATE ItemKeyPrice
SET RegPrice =
(SELECT ItemKey.KeyNumber, SUM(ItemKey.Price) AS PriceInd
FROM ItemK... more >>
Filtering Mass Records
Posted by Craig at 12/11/2005 2:06:02 AM
I'm using SQL 7. I have a form with numerous clients and would like to
filter by first letter (ie, all clients beginning with 'A'...etc). So
something like:
SELECT [ClientName]
FROM MyTable
WHERE [ClientName] Like '[AÀÃÂÃÄ]%'
You'll notice the syntax...I took it from the Northwind... more >>
temp table
Posted by Sam at 12/11/2005 12:00:00 AM
is there a way to keep alive a temp table that all the way until
application is closed
while the temp table:
1. has same name for different users
2. can be used also by stored procedures
sam
... more >>
|