all groups > sql server programming > january 2005 > threads for sunday january 9
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
update a date field (remote timeformat)
Posted by Agnes at 1/9/2005 11:50:32 PM
I am wrongly save the issuedate as Datetime.now() [I should save as
Datetime.today]
now, How can I update the datefield with the timezone should be 00:00:00 ?/
Thanks a lot
... more >>
Gender column field
Posted by Alan at 1/9/2005 9:22:23 PM
What do you think should I do to define this column?
1) Char(1) for M and F OR
2) CHAR(6) for Male and Female OR
3) Integer for foreign key references the lookup table ?
... more >>
Get the Identity value
Posted by Alan at 1/9/2005 9:02:15 PM
In a multi-user application to insert a record in a table have an IDENTITY
primary key, how do I get this newly created integer in the stored procedure
?
... more >>
Restart SQL Job When Failed
Posted by BTLye at 1/9/2005 8:03:03 PM
Hi SQL experts,
May I know any way to restart a SQL scheduled job automatically when the job
is failed (regardless of what error)? The job is scheduled to be run when SQL
agent starts.
Thanks... more >>
Multirow UPDATE - Have I Got It Right?
Posted by Gary K at 1/9/2005 7:15:01 PM
After looking through the BOL & newsgroups I've come up with the following
format for a multirow update query. Specifically for the INSTEAD OF UPDATE
trigger, I'm interested to know if it is general enough to be used elsewhere
(using other tables instead of inserted,deleted)? And of course I a... more >>
design question
Posted by Bern at 1/9/2005 6:32:56 PM
I'm designing an online reservation system where users can reserve items.
There are 2 tables in my database:
TABLE users(
[id] TEXT(10),
[password] TEXT(20),
[reserves] INTEGER
)
TABLE reservations(
[id] TEXT(10) FOREIGN KEY REFERENCES users([id]),
[itemid] INTEGER
)
Each u... more >>
What's wrong with this
Posted by Alan at 1/9/2005 5:13:56 PM
I got
Missing end comment mark '*/' error in Query Analyser for the following
T-SAL:
/*
alter PROC proc_GetPatronDetails @PatronID INTEGER
AS
SELECT @LastName = p.LastName,
@FirstName = p.FirstName,
@Title = p.Title,
@D... more >>
Removing and Adding IDENTITY on columns in a table
Posted by Nevyn Twyll at 1/9/2005 3:17:15 PM
From C#, using ADO, or through direct SQL, how would I Alter an existing
column to add or remove Identity from it?
How does Enterprise Manager do it?
- Nevyn
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Hash join problem
Posted by Roy Goldhammer at 1/9/2005 12:52:35 PM
Hello there
I need to fix database or its query because it work two slow
When i show the execution plan i've seen that many of my joins on there are
hash join and the running cost of them are very high
On the hint i've seen two objects Hash:.... and residual. What are it meens?
The fiel... more >>
delete command
Posted by ST at 1/9/2005 11:13:01 AM
I have a table that lists multiple records for 1 subject. I'd like to delete
all extra records except the first one listed...is there a way to do this?
example:
PID SID BID
1 5 14
2 5 15
3 5 16
4 6 25
5 6 26
6 ... more >>
Log Shrinking
Posted by exBK at 1/9/2005 6:11:03 AM
Hi,
I have a DB that is about 4GB in size and its log about 9GB. I wanted to
Shrink the log. I am doing the following to acheive the same:
1. Detach the DB.
2. Rename the Log file.
3. Attach the DB and create a new Log file.
The question I have is, will this affect my data in anyway? i.e... more >>
reverse transpose
Posted by Andre at 1/9/2005 1:12:42 AM
I have a table that essentially looks like a spreadsheet, with amount
columns for jan-dec. I'd like to get this data into a format like this:
fields....
period (depends on the month in spreadsheed. i want 1-12)
amount (depends on the month - sum of january for period 1, sum of feb for
perio... more >>
JOIN not returning desired value, please help!
Posted by JT Lovell at 1/9/2005 12:01:30 AM
I'm writing a query that summarizes some data and compares it to other =
summary data, but I don't understand the values resulting from one of =
the joins. I've written a test script that will better illustrate the =
problem and show my desired results. What is wrong with the join I am =
using... more >>
|