all groups > sql server programming > may 2007 > threads for tuesday may 22
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
Lock all tables in a transaction
Posted by Marty at 5/22/2007 10:38:00 PM
I am writing a holiday booking database. I have an absence table and a rules
table.
For any one day only X days holiday can be booked, where X is stored in the
rules table.
So when booking holiday we lookup X in the rules table, then get the count
of records in the absence table for the date... more >>
Syntax error
Posted by zwieback89 at 5/22/2007 9:57:35 PM
Hi,
I get the error - [Microsoft][ODBC SQL Server Driver]Syntax error or access
violation
with the SQL query as follows:
Insert INTO Pre_Appraisal_Competency (CompetencyTypeID, Evidence, CreateDate,
CreateLawsonID, PreAppraisalGUID, RatingID)
Values (1,
'Responds quickly and effective... more >>
How to "lock" a row of data from being accessed
Posted by Rob at 5/22/2007 8:20:34 PM
I will be writing a stored proc to add rows of data into a table....
There exists a "counter" table which has the next "id" available for use in
the above process...
The procedure will grab that number, use it as a key value in the newly
inserted row, then I am to increment the value in th... more >>
Re: Converting Non-ANSI joins to ANSI joins
Posted by Shocky at 5/22/2007 7:16:22 PM
Thanks a lot Dan
On May 23, 5:41 am, "Dan Guzman" <guzma...@nospam-
online.sbcglobal.net> wrote:
> > Can someone please help me in writing the below query with proper ANSI
> > joins?
>
> I believe the query below is equivalent. For inner joins, you can specify
> the join conditions jus... more >>
Converting Non-ANSI joins to ANSI joins
Posted by Shocky at 5/22/2007 4:44:59 PM
Hi,
i have been given a query to convert its non-ansi joins to ansi
compliant joins.
i am having difficulty in doing so, as it is a bit complex (one table
has join conditions with more than one other tables)
Can someone please help me in writing the below query with proper ANSI
joins?
SEL... more >>
SS2k5: why can't I script mutiple tables from diagrams any more ?
Posted by PJ6 at 5/22/2007 3:47:36 PM
In SS2K I can select many or all tables in a diagram and generate a script
from the right-click menu ("task/generate sql scripts"). I can't find this
functionality in SS2K5 now... how is it done?
Don't tell me they dropped that feature too?
Paul
... more >>
database diagrams
Posted by gracie at 5/22/2007 2:26:00 PM
In ms sql 2000, I have created a diagram that will be deleted whenever the
database is restored from a different environment. Is it possible to save the
digram and restore it?... more >>
taking datafile online - HELP!
Posted by B D Jensen at 5/22/2007 1:26:57 PM
Hi!
I took an databasefile offline (SS2005):
alter database <db> modify file (name = '<name>', OFFLINE);
because I want to place it on new drive.
But now I'm not able to take it online!
How to take it online with restore-command?
I have no backup-"device" - I have the original datafile whi... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
i cant see the thread
Posted by verygross at 5/22/2007 1:00:24 PM
why cant i see any messages in this thread.
it says : "All messages in this topic may have expired or been deleted"
... more >>
Collection of All SQL Commands
Posted by sqltree NO[at]SPAM gmail.com at 5/22/2007 12:31:26 PM
Hi
I would like to introduce www.sqltree.com website to our group
members. This is exclusively for SQL beginners, students & learners.
It has huge collection of frequently used SQL Commands in a day to day
DB programming life at one place.
&
You may execute your own SQL Commands online, with... more >>
Export data from SQL 2005 to Access
Posted by fniles at 5/22/2007 12:04:31 PM
I am trying to export data from SQL 2005 to Access.
I have created all the tables in Access, all I want to do is export the data
from SQL to Access, I do not want the export process to create the table in
Access.
In SQL 2005 I right click on the database - Task - Export. I selected my SQL
Se... more >>
Re: text datatype in new SQL Server (test with Temp table)
Posted by mgm at 5/22/2007 11:40:22 AM
From: "mgm" <mgm@hotmail.com>
Subject: Re: text datatype in new SQL Server
Date: Tuesday, May 22, 2007 10:38 AM
Oh, I see - I did read the article, but was still only 'seeing' that the max
was 8000.
I did just do a test though and found I could input more than 8000
characters (13000) in a va... more >>
error with linked server from sql server 2005 to 2003
Posted by verygross NO[at]SPAM gmail.com at 5/22/2007 11:29:07 AM
I created a linked server (test) on SQL 2005 to sql server 2003
The linked server works fine with a standard query, but
when using a simple subquery i get this error:
OLE DB provider "SQLNCLI" for linked server "test" returned message
"Cannot create new connection because in manual or distribu... more >>
Simple Question About BLOBs
Posted by Tom Cole at 5/22/2007 11:06:58 AM
If I have a table with a column of type image AND I've got store in
row turned OFF, I get in the column what appears to be a pointer to
the binary data itself. This works great. My questions are:
1. Where exactly is that binary data stored by default, if it's not in
the row.
2. If I delete a ... more >>
parsing string into sequence of numbers and letters?
Posted by VMI at 5/22/2007 11:02:06 AM
How can I parse a string and determine that it has the pattern "AA99BB"
(group of letters, group of numbers, group of letters) or "AA99" (letters
and numbers) or "99BB" (numbers and letters)? I created two functions that
extract the numbers and the letters of a string, but I'm not sure how to ... more >>
Deadlocking in Common Scenario?
Posted by MattN at 5/22/2007 10:46:03 AM
All,
I am surprised to be getting deadlocks in what would seem to be an extremely
common scenario. We have a sproc that inserts into two tables in a typical
one-to-many relationship. It is wrapped in a transaction so that no records
get inserted on the 'one' side without matching records on... more >>
Worng identities being returned: not trigger related
Posted by JimLad at 5/22/2007 9:59:41 AM
SQL SERVER 2000
Hi,
We have some code that inserts to a table and then uses @@IDENTITY to
get id. Yes we should use SCOPE_IDENTITY but that is irrelevant at the
moment as there are no triggers on the table.
When we are hammering the server with loads of concurrent stuff, we
seem to be ge... more >>
Changing passwords
Posted by david NO[at]SPAM thechameleongroup.co.uk at 5/22/2007 9:09:02 AM
I am trying to use sp_password to allow users to change their own
passwords. I am getting the message "select permission denied on
object sysxlogins database master owner dbo". I can update the
password if I make myself a member of system administrators - could
you tell me the best way of allowi... more >>
timestamp and getdate()
Posted by gracie at 5/22/2007 7:58:00 AM
Is there a way to automatically supply a timestamp value like the getdate()
function when using an insert statement for a record?
... more >>
Conversion failed when converting the varchar value.. to data type int.
Posted by Mark at 5/22/2007 7:19:54 AM
Hi - thank you for the suggestions in a previous mail.
I need to 'loop' inside a SP as I will be doing some processing of the
data, before it's sent back. This is all going to be scheduled to run,
so I can't use a web page to do that processing.
However, when I run: EXEC TEST '' I get the e... more >>
Replace with regular expression in sql server 2000.
Posted by Archana at 5/22/2007 7:14:04 AM
Hi all,
i want to replace particular pattern of string using regular
expression in sql server 2000.
Can anyone tell me how to do this.
thanks in advance.
... more >>
Help on : Querry between 2 database ??
Posted by calderara at 5/22/2007 7:12:00 AM
dear all,
I need to build a querry from one SQL database which need information from
table of an other SQL database.
Is this possible and how ?
I am using SQL 2005 standard edition
Thanks for help
regards
serge... more >>
Timeout though using NOLOCK
Posted by chakhem at 5/22/2007 7:02:12 AM
Hello.
We have a complex application connecting to sql server via odbc.
With one of our customers we have the problem, that one SELECT
statement results in a timeout:
SELECT P.doku_id, P.dokuart, last_update_file,
F.dok_dat_feld_1 ...
FROM p_table P (NOLOCK), f_table F (NOLOCK)
... more >>
2 simple syntax questions
Posted by Peter at 5/22/2007 5:46:00 AM
Hello,
I am rather new to SQL and have two simple questions about the Update
command and Distinct.
1) Why do you have to reference the table twice in the update command
UPDATE <table>
SET xxx=xxx
FROM <table>
where xxx=xxx
I get a syntax error if I leave out the first reference?
... more >>
Loop through results in SP
Posted by Mark at 5/22/2007 5:36:45 AM
Hi - I'm relatively new to sql server express, and would appreciate some
guidance. I would like to build an html table in a stored procedure, and
send the result as an email. I'm ok with the email part, but how do I
execute and loop through a select query?
Thanks for any help,
Mark
BE... more >>
Selecting previous weeks data in query
Posted by Mark at 5/22/2007 1:59:39 AM
Hi - I've been asked to run a report each Monday morning, to select
information from a table for the previous Monday 00:00 to Sunday
midnight, the night before.
Is there some way of doing this in SQL Server 2005, eg:
SELECT staff_name, datesick from SICKTABLE where sickdate >="current
date ... more >>
Migrating to 2K5
Posted by Computer User at 5/22/2007 12:00:00 AM
I have been asked to look at moving a database application to SQL 2K5.
In the existing application, one SQL 2K server imports data from
another linked sql 2K server by running statements like
insert into <tablename>
select col1,col2, col3,...
from server2.dbname..tablename
I backed up the ... more >>
sp and views Passing Parameters
Posted by New Bee at 5/22/2007 12:00:00 AM
I have a little question hoping someone could answer.
I have three views which I role up using a union inside a stored procedure
so it looks something like this.
1.) I need to pass the @HourlyRate to the three views but in sql2000 it wont
let you specify paramters in the designer. How can ... more >>
Integrity constraints check
Posted by satish at 5/22/2007 12:00:00 AM
Hi everybody,
I have a doubt and plz help me out.
Iam using SQL Server2005.
While loading data into the tables iam disabling all the integrity
constraints and after i finished loading iam enabling all of them. Now the
problem is after loading i see that there is some data which is not at ... more >>
insert
Posted by Hrvoje Voda at 5/22/2007 12:00:00 AM
I'm using this code to get information from different tables.
How to insert it's result into new table?
declare
@Sifra uniqueidentifier,
@Naziv nvarchar(50),
@Reziser nvarchar(50),
@GProizvodnje nvarchar(50),
@Glumci nvarchar(250),
@SizeBLOB int,
@PathVelika nvarchar(250),
... more >>
OPENROWSET
Posted by simonZ at 5/22/2007 12:00:00 AM
In first server I have stored procedure, which uses temp tables between
others.
On second server, I call this procedure with OPENROWSET function and I get
an error, as that temp table doesn't exists:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name '#cntTemp'.
If I execut... more >>
Date Format
Posted by Gunawan at 5/22/2007 12:00:00 AM
Hi All,
I am new to T-SQL and SQL 2005.
I would like to use this command that I used to with Access.
SELECT orderDate, format(orderDate,"mmdd") AS dateCode, format(Quantity,
"#,###.00") AS orderQuantity
FROM myTable
How can I do those thing in T-SQL?
Thank you in Advance
Regards,
Gun
... more >>
|