Viewing 15 posts - 2,731 through 2,745 (of 3,543 total)
How about this
CREATE TABLE tblLocationGradeTeacher (Location2 int, Grade int, T_id int, TeacherID int)
INSERT INTO tblLocationGradeTeacher VALUES (371, 2, 1, 10371)
INSERT INTO tblLocationGradeTeacher VALUES (371, 2, 2, 121371)
INSERT...
March 31, 2004 at 5:12 am
All the update does is to set Z_Id to an incrementing number starting at 1 for each Booking. The order of the data is done by the INSERT statement, add columns to the ORDER...
March 31, 2004 at 1:01 am
aw shucks, Antares beat me to it, this is my explanation
SQL Server stores its dates in binary and the lowest value allowed is 0. Any time you use a number...
March 26, 2004 at 6:27 am
You will need to put a loop around the fetch, create and insert statements to do each row selected.
But why are you using a cursor, this should do the same
Create...
March 25, 2004 at 6:40 am
SELECT (CASE WHEN seq = 1
THEN CAST(job_id1 as varchar)
ELSE '' END) AS job_id,
job_desc
FROM (SELECT job_id AS job_id1, 1 as seq, LEFT(job_desc,500) AS job_desc
FROM...
March 23, 2004 at 5:55 am
What wizard? How do you want to store the values. Are they numbers (some locales use comma instead of full stop as decimal separator).
If you want to store the values...
March 18, 2004 at 6:35 am
The inserted table will contain 1 or more rows depending on how many rows are being inserted.
with this staement
INSERT INTO dbo.myTable (IDField, IDField) VALUES ('A','B')
the trigger will have an inserted...
March 18, 2004 at 6:28 am
Check the contents of gintSite to make sure it contains a value. You will get this message if no value is put in the parameter. Can be a result of...
March 17, 2004 at 6:52 am
To quote Microsoft
'Because SQL Server Service Packs are cumulative, SP4 includes all fixes from previously released Service Packs, and can be applied to an original installation or to one where...
March 17, 2004 at 6:41 am
The column headers are an intrinsic part of the recordset output and cannot be removed. Only the application that receives it can choose not to display them. wz700 is correct...
March 17, 2004 at 6:33 am
SELECT REPLACE(REPLACE(STR(col1,15,2),'.',''),' ','0')
SELECT REPLACE(CONVERT(varchar,col2,103),'/','')
March 16, 2004 at 6:10 am
UPDATE p
SET PriceName = (CASE
WHEN p.Price IS NULL THEN CAST(FLOOR(a.Price) AS varchar) + ' & Above'
ELSE CAST(FLOOR(ISNULL(a.Price,0)) AS varchar) + '-' + CAST(FLOOR(p.Price) AS varchar)
END)
FROM...
March 12, 2004 at 6:57 am
CREATE TRIGGER AfterInsertSysData
ON SystemDataTest
AFTER INSERT
AS
INSERT INTO Books (rid,fname,book_date)
SELECT s.rid,s.fname,s.book_date
FROM inserted i
INNER JOIN SystemData s
ON s.rid = i.rid
INNER JOIN res_test r
ON...
March 12, 2004 at 5:32 am
Thats OK Frank,
Thought there was an echo
there was an echo
was an echo
an echo
echo
echo
March 11, 2004 at 7:18 am
Jonathan, as usual, in on the ball here. His solution is the answer to your question (I overlooked the word sum doh )....
March 11, 2004 at 7:12 am
Viewing 15 posts - 2,731 through 2,745 (of 3,543 total)