all groups > sql server programming > april 2007 > threads for thursday april 5
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
sql server and java doubts
Posted by Sandeep.Pallapothu NO[at]SPAM gmail.com at 4/5/2007 10:34:06 PM
question 1
----------------
i am passing an array from java using stored procedure to sqlserver.
i want to read it from sqlserver.
can any one send me code to read array values from sqlserver.
also
question 2
------------------
I want to print one xml file on browser using DOM parse... more >>
WHERE IN @Variable?
Posted by Spam Catcher at 4/5/2007 8:05:33 PM
Hi all,
How do I pass in variable for an IN clause?
For example:
SELECT * FROM TABLE WHERE Column IN (1,2,3,4,5)
How do I pass the 1,2,3,4,5 as a SQL Parameter?
Can I go: SELECT * FROM TABLE WHERE Column IN (@MyParameter)?
Thanks!... more >>
Question
Posted by Manny Chohan at 4/5/2007 7:08:01 PM
Hello, I have following table structure with data:
ID Name Title DateTime
1 ABC Title1 3/4/2007 08:25:24PM
2 ABC Title1 3/4/2007 08:29:18PM
3 ABC Title1 ... more >>
Query dbf file via linked server with '(' and ')' characters in dbf file name
Posted by faivreb NO[at]SPAM ecs.csus.edu at 4/5/2007 6:21:54 PM
Hello,
I set up a linked server and am able to query the dbf named "File.dbf"
correctly with something like:
SELECT * FROM LL...File
And dbf files with spaces such as "File With Spaces.dbf" with
something like:
SELECT * FROM LL...[File With Spaces]
However I am not sure how to handl... more >>
where are other dates?
Posted by sk NO[at]SPAM email.si at 4/5/2007 5:29:27 PM
using this query I only get dates from the 1st of April and from 10th April
forward ... what am I doing wrong?
SELECT TOP 100 PERCENT dbo.Stranke.Sifra, dbo.Stranke.Partner,
SUBSTRING(dbo.Stranke.Opombe, 1, 255) AS Opombe, StrankeOpcije1.Vrednost
FROM dbo.Stranke LEFT OUTER JOIN
... more >>
some kind of unique identifier for a transaction?
Posted by Jiho Han at 4/5/2007 2:31:25 PM
I am trying to capture some kind of unique identifier for a transaction from
a trigger so that I can group a whole bunch of record changes with it. It
can be anything really.
I've searched here but found not much of anything. One post indicates
sys.dm_tran_current_transaction but I couldn... more >>
CLR Trigger
Posted by Ron at 4/5/2007 1:22:03 PM
I have a working CLR trigger, but it needs error handling.
My plan is to add a routine to enter errors into a log table, so I added a
sub with a SqlCommand to execute a SQL Insert into the table.
It does not perform the insert. Instead, I get the error: The current
transaction cannot be c... more >>
Horizontal, but only distinct columns?
Posted by jobs at 4/5/2007 11:45:08 AM
This select produces a nice clean, distinct list of emails. the View
has many dups.
select distinct email from access_vw
However, Im' trying to get that list horizontally seperated by commas.
This t-sql produces the list the way I want, but contains duplicates.
declare @x varchar(1000)
s... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Referential Integrity
Posted by Daniel at 4/5/2007 11:18:36 AM
Looking for some links or possibly books that anyone can suggest as good
material to learn how to build and make sure that "Referential Integrity" is
in place...
I have the following Books already:
Microsoft Press - The Storage Engine
Microsoft Press - Database Essentials
Microsoft Press... more >>
Relationship
Posted by shapper at 4/5/2007 10:46:22 AM
Hello,
I created some SQL 2005 tables using Microsoft SQL Server Management
Studio.
I know wanted to get the script code of those tables.
I was able to do that by right clicking over each table.
But how can I get the code for the relationships between the tables?
Thanks,
Miguel
... more >>
SQL Connection Slow in DMZ
Posted by jswencki NO[at]SPAM gmail.com at 4/5/2007 10:42:44 AM
We have an issue where our asp.net app connects to sql 2000 in a DMZ
through a pix router. There is no ACL(Access Control List) in place,
so 1433 is allowed. It connects, but very slowly, 5 seconds to
return
page. When on the same side of the wall, it is 1.5 seconds. Is
there
a SQL setting... more >>
load random number
Posted by gv at 4/5/2007 10:41:46 AM
Hi all,
Simple question: I want to insert a 1 or 2 randomly in a column?
thanks
gv
... more >>
Total Row Length
Posted by CLM at 4/5/2007 10:38:04 AM
Is there an easy way to get the total row length for a table? Right now I'm
adding up the columns individually by byte for the given data type. But I
thought maybe it was sitting out there somewhere. Also, how does it handle
varchar's?... more >>
SELECT with or without parameter
Posted by shapper at 4/5/2007 9:01:24 AM
Hello,
I have a stored procedure with an input parameter named DocId.
I want to select all records if DocId is null or the record with the
given DocId if it is not null.
My code is pretty more complex then this.
SELECT
....
Some code
...
FROM myTable t1
...
Inner Join... more >>
query with udf slow performance
Posted by fnoppie NO[at]SPAM gmail.com at 4/5/2007 8:35:37 AM
Hi,
I have a rather simple query that includes a UDF.
-- QUERY --
select personName from person, address, sectorK
where PERSON_NUMBER=ADDRESS_NUMBER
AND PERSON_AANVRAAG=ADDRESS_AANVRAAG
AND ADDRESS.ADDRESS_TYPE = 'f' AND sectorK.sector = '31224' AND
ADDRESS.ADDRESS_CODE = sectorK.code
... more >>
UDF in Trigger not working properly
Posted by cbtechlists NO[at]SPAM gmail.com at 4/5/2007 8:15:33 AM
I have a database moved over from SS 2000 to 2005 that has an UPDATE
trigger we've been using for auditing changes to tables.
One of the fields ('SKU') also validates against another DB to make
sure it's not being used in records there before allowing
modifications. This was added when we wer... more >>
SQL schema change scripting tool
Posted by Larry Epn at 4/5/2007 8:14:10 AM
Hoping for some general guidance.
Assuming I'm in a "one-guy-shop" and responsible for all C# ASP.NET
programming and SQL2005 programming, and responsible for all change control
to an important application, I am in need of a tool that will work something
like this.
1. I make a copy of a S... more >>
how to move tempDB - detach is grayed out in EM ?
Posted by Rich at 4/5/2007 8:14:02 AM
Hello,
I need to move tempDB (sql server 2000) because the default install was on
the c drive on Win2003 server. The detach option in Enterprise Manager is
grayed out. One of the database's (data DB) is in replication on this sql
server and we are running IIS on the same server computer. ... more >>
DateTime over 2 hours ago or NULL between 6am and 7pm?
Posted by jobs at 4/5/2007 7:53:23 AM
Hello.
I have a table with a datetime column.
I need to select rows with a NULL or a datetime earlier than 2 hours
ago if getdate() time is currently between 6am and 7pm.
Thanks for any help or information!
... more >>
Output Parameter
Posted by shapper at 4/5/2007 7:52:41 AM
Hello,
I have a simple procedure which for a given ID returns only one
record.
I have this made in two different ways:
1. Use Output parameters for each column in table.
In my .NET code I execute a non query.
2. Use select without individual parameters
In my .NET code I execute a dataset
... more >>
How to ensure that ActiveX Script Task runs before Transform Data Task.
Posted by aiu4840 at 4/5/2007 7:27:07 AM
Hello SQL Gurus:
I have a DTS package that has two tasks: ActiveX Script Task (A.X.T.)
and Transform Data Task (T.D.T.). The A.X.T. just basically renames
the file "NutriliteMESIndirectTransactions" to
"NutriliteMESIndirectTransactions_dmyyyy" and is defined as follows:
'******************... more >>
SqlDependency and only one event raised
Posted by CraigGRA at 4/5/2007 5:45:13 AM
Hi can anyone help
I have been testing a concept for an application using SQLDependancy
to monitor changes to a simple SQL select query.
I have the test application working but it only raised the "On Change"
event for the first change to the table other changes are not raiseing
an event.
I hav... more >>
ORDER BY CASE problem
Posted by Bob at 4/5/2007 2:12:01 AM
-- SQL2005 - Trying to use ORDER BY with CASE expression seems to be dropping
rows. Why does it do this? Is there a known problem using ORDERBY with CASE?
Thanks
wBob
USE tempdb
GO
DROP TABLE dbo.test
GO
CREATE TABLE dbo.test( test_id INT PRIMARY KEY, test_date DATETIME NOT NULL )... more >>
Strange query behavior
Posted by bubbles at 4/5/2007 2:10:36 AM
SQL Server 2005 with Access front-end.
Have several UPDATE queries on the Access front-end (VBA/SQL) that
works fine,
but one particular query returns an error stating that the query is
not updateable.
The table concerned is very simple - only three fields: Yr, Mth, Wk
and only
one row of... more >>
database design question
Posted by Paul at 4/5/2007 12:28:00 AM
Hi!
We are designing a big database with multiple parts (like Human Resources,
Sales, Production) etc. in Sql server 2005. Should we devide the main parts
into separate databases, or should we put all tables in a single database and
use schemas to group the parts (like the AdventureWorks sa... more >>
Strange NULL value behaviour / RequiredFieldValidator
Posted by Eric Layman at 4/5/2007 12:00:00 AM
Hi everyone,
Im puzzled by a NULL behaviour in SQL 2000 server.
There is a column in the table that does not allow NULL.
During data mining, the staff noted that, for that particular column, there
are a few records that are empty.
I do not specifically know whether they are "alt + 0160... more >>
Recommendations for a decent/user friendly reporting package please
Posted by Claire at 4/5/2007 12:00:00 AM
Having struggled with Crystal Reports yet again. I've had a brief look round
for another reporting package but wondered if the community have any
recommendations.
It needs to be useable within visual studio in the same way that Crystal
Reports is but more user friendly and glossier looking.
... more >>
|