all groups > sql server programming > december 2004 > threads for saturday december 4
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
Help on Dynamic SELECT
Posted by Andrea at 12/4/2004 11:18:55 PM
I need to create a stored proc that run a select with dynamic where clause.
For example:
SELECT * FROM Table WHERE country=1
SELECT * FROM Table WHERE name='james'
SELECT * FROM Table WHERE country=1 AND name='james'
SELECT * FROM Table WHERE city='NewYork'
SELECT * FROM Table WHERE name='ja... more >>
select city from cities where city like (select '%' + city + '%' from stores where city like '%paul%')
Posted by thomasamillergoogle NO[at]SPAM yahoo.com at 12/4/2004 9:12:32 PM
select city from cities where city like (select '%' + city + '%' from
stores where city like '%st%')
You can see probably what I am trying to do. Is there a way to do this
without using a cursor?... more >>
Help on Ignored Words in Full Text Query
Posted by Andrea at 12/4/2004 6:11:20 PM
I'm implementing the search features on a web site.
If I search for several words not in the noise file everithing is ok.
If I search with several words and only one of it is in the noise file
the query fails with
Execution of a full-text operation failed. A clause of the query
contained on... more >>
Must declare the variable error..
Posted by BonGee at 12/4/2004 6:06:57 PM
What is the Problem on this code. ?
Thanks
Server: Msg 137, Level 15, State 2, Line 16
Must declare the variable @tablename
DECLARE GET_COUNTS CURSOR
FOR
SELECT "name" AS TABNAME FROM sysobjects
WHERE (xType = 'U') AND ("name" LIKE 'L%')
ORDER BY "name"
OPEN GET_COUNTS
DECLARE ... more >>
trigger sql syntax errors (very difficult to troubleshoot)
Posted by John A Grandy at 12/4/2004 4:14:07 PM
i've troubleshot many trigger sql syntax errors , but this time i am stumped
.... probably something very simple i'm overlooking ....
the QA error is
Server: Msg 170, Level 15, State 1, Procedure TriggerChangeHistoryAddress,
Line 100
Line 100: Incorrect syntax near ','.
Server: Msg 170, ... more >>
When a client application cancels a query, ...?
Posted by Victor Feng at 12/4/2004 1:29:02 PM
1. When a client application cancels a query and does not roll back
transaction, we know that the locked rows are not released. If we kill the
SPID from the server, or user closes the application, will the locked rows be
released?
2. BOL states that "An application should never force the us... more >>
Recommended way to check if a DB already exists on SQL Server
Posted by TomTom at 12/4/2004 12:27:52 PM
Hi,
I would like to know what would be the recommended way to check if a
database has already been created on the SQL Server. I want to write a C#
app that checks the existence of the DB. It won't process further if a
specified DB does not exist. Thanks!
Tomtom
... more >>
DTS Data Pump Error
Posted by Mike Labosh at 12/4/2004 11:34:51 AM
I have inherited a DTS package (85 of them, actually) that imports a
semicolon delimited .csv file. One of the logical columns of the file is a
date formatted like this: m/d/yy h:mm:ss
The Data Pump task throws this error:
Source Column 'UPDDateStamp' (DBTYPE_STR), Destination Column 'UP... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
query a SQL server
Posted by Rubinos at 12/4/2004 10:49:02 AM
What is required to query a SQL server from an Excel spreadsheet?... more >>
function select
Posted by ven at 12/4/2004 9:51:30 AM
hello
i want to get all records from items table such as name,id_item, and others
and i have a function in database that returns dominant netto_price and
brutto_price because there are few tables with individual prices for each
contractor. Contractor_id is a input parameter in function but i ... more >>
Multiple results from single CASE?
Posted by Mike Hoff at 12/4/2004 5:51:25 AM
Hello,
I need to evaluate several variables based on a single parameter passed into
a stored procedure. I am able to do this using CASE statements, but am
wondering if there is a way to combine multiple CASE statements to clean up
the sp. Below is a portion of my sp (there are actually 8 mor... more >>
Urgent help needed. How to search using LIKE if keyword itself is "%"?
Posted by kackson NO[at]SPAM yahoo.com at 12/4/2004 1:54:48 AM
Hi.
When I do a search using the LIKE, I can use % as the wildcard. But,
what if I am searching a text and the text itself has the character %?
I tried, but hell nothing works, I just cannot get it to find text
that contains the word "%" itself. Appreciate any help please. Thank
you.... more >>
Recurrencing
Posted by adam1225 NO[at]SPAM poczta.onet.pl at 12/4/2004 12:59:16 AM
Hello everybody,
I'am starting to programing sql so please forgive me if
my question is "laming". First of all, I have looked for
solution on the microsoft.public.sqlserver.programming
but I found nothing.
I would like to do Bill Of Material (Recipie) from data
which are stored in tabe... more >>
What type should i use for a field which acts as a filter?
Posted by Miguel Dias Moura at 12/4/2004 12:34:58 AM
Hello,
On some tables I am using a field to use as a filter of records.
For example, I can display all professors, students or parents by using
the {type} table field as a filter. "p" or 1 for professors and "s" or 2
for students and "r" or 3 for parents.
I am using an SQL 2000 database... more >>
|