Hello all,
Just a general question:
Is there a query/command I can pass to SQL Server not to use cache when executing a particularly query?
I am looking for a query/command that I can set rather than a configuration setting. Is there no need to do this?
...
How do I consolidate multiple publications into 1 consolidated table on the subscriber? For example. Consider a very simple sales model where we replicate sales data from the stores to the central office.
Store 1 Sales Table
=====================
Item Qty Amt
=====================
111 2 10.00
222 1 ...
I have a stored procedure that selects from a table, two of the fields are DATE type in SQL Server, but when I select the stored procedure from Crystal Reports, the two date fields appear as Strings (in the YYYY-MM-DD format). I could write formulas to convert these to the MM/DD/YYYY output that is expected for this report, but is there...
SELECT
PB_BANK_CODE, ---- DB ITEM
PB_BANK_NAME, ---- DB ITEM
TOTAL_AMOUNT --- NON DB ITEM
FROM GLAS_PDC_BANKS
where PB_COMP_CODE=:parameter.COMP_CODE AND pb_bank_code in(select distinct pc_bank_from from glas_pdc_cheques where PC_COMP_CODE=:parameter.COMP_CODE AND pc_due_dateTIME between :block01.date_from and :block01....
Using SQL Server 2005
Date Time
20060701 090000
20060702 020000
20060703 180000
...
Date and Time datatype is varchar
Tried Query
select Convert(datetime, Convert(char(10), date, 103) + ' ' + Convert(char(8), time, 108), 103) from table
SELECT
CAST(
DATEADD(dd, 0, DATEDIFF(dd, 0, date)) + ' ' +
DATEADD(Day, -DATEDIF...
Using SQL Server 2005
I want to get only numeric values from the table
Column1
12345
asdf
2312
ase
acd
...,
Tried Query
Select Isnumeric(column1) from table
Showing Result as
1
0
1
0
0
..,
I need the colum1 numeric value
Need SQL Server Query help
...
I'm using If Condition Srore procedure...
But .. I need if stored procedure with where in if else condition and concatenate with to and condition in Query..
Examble
create procedure [dbo].[Sp_Name]
@code int,
@dCode int
As
select <.........> from <tablename>
Where empcode=@code
if (@dCode != 0)
Begin
And dptcode=@ dCod...
hi guys,
I have following query.
declare @Prm_CourseId int
declare @Prm_SpecializationId int
set @Prm_CourseId=5
set @Prm_SpecializationId=0
declare @WhrStr varchar(500)
set @WhrStr = case @Prm_CourseId
when 0 then
'e.CourseId is null or e.CourseId is not null'
when -1 then
'e.CourseId is null o...
how to link two different database in same SQL Server instance
and send queries between them
...
Hello!
Our application runs alongside another application on a customers machine.
We have put some efforts regarding avoiding long-running locks in tempdb since this obviously affects concurrency badly.
The other application, however does things like:
begin transaction
create #Table(...);
insert into #Table(....) values(...
I have a table with with 7,526,511 records with the following definition:
/****** Object: Table [dbo].[LogSearches] Script Date: 12/07/2009 09:23:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[LogSearches](
[ID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[Acct_ID] [int...
I dragged Execute t-sql statement task from toolbox. clicked new and created new connection.
when i executed, it executed successfully. there was no db showing in con string.
i changed the connection string to point to new server of above in Connection tab.
when i executed it, i recv errr
Description: Executing the query "DBCC SHRINKFI...
I have a number of type Decimal(8, 2) and have been using Substring to get fractional value.
E.g.)
declare @val decimal(8, 2), @strVal varchar(10)
set @val = 15.80
set @strVal = cast(@val as varchar)
select @val, substring(@strVal, charindex('.', @strVal), len(@strVal))
Is there a better way to simply get fractional value, .80 fro...
I need a template to document an SSAS cube.
Cube info
Single source of data
One main Fact table
Five direct dimensions
Two many-to-many dimensions
48 Partitions, 48 Aggregations
Can anyone point me to design templates for SSAS cubes?
...
Is there a way to parse a Google search string to a table variable in T-SQL?
By Google search string I mean, including the plus sign (require), minus sign (exclude), and exact phrase (double quotes) operators.
For example the following search string:
one -two +three "four five" -"six seven" +"eight nine" "ten eleven twelve"
Would be ...
I'm looking to get the trace logs for AS (same stuff as for SQL server) in real time. I can't find any .net interfaces to this stuff. So far the only realistic solution I can think of is to run it permanently and have it dump to a new table which I listen to on updates via triggers.
Does anyone know of a better way of doing this?
This ...
Hi,
I am trying to write a SQL Server query but have had no luck and was wondering if anyone may have any ideas on how to achieve my query.
What i'm trying to do:
I have a table with several columns naming the ones that i am dealing with TaskID, StatusCode, Timestamp. Now this table just holds tasks for one of our systems that run ...
Hi,
I have a SP using FTS (Full Text Search). I want searches across multiple fields, 'intelligently' ranking results based on the weights I assign.
Consider a search on a view fetching data from tables: Book, Author and Genre.
Now, I want the searcher to be able to do: "Ludlum Fiction", "Robert Ludlum Bourne", "Bourne Ludlum", etc....
How can I make a list of values repeating horizontally in SSRS 2008? I tried to use the steps outlined at http://blogs.msdn.com/chrishays/archive/2004/07/23/HorizontalTables.aspx but these steps are not congruent with SSRS 2008 and seem to be limited to SSRS 2000/2005.
...
I'm looking at an error from one of our web applications, and it was calling a stored procedure that was responsible for updating a record in the database.
This stored procedure has worked for weeks with no issues. Then one day it started throwing errors, while debugging we found the cause to be inside the stored procedure.
It basicall...