Viewing 15 posts - 31 through 45 (of 90 total)
I have made a header table called [VehicleAnalysis_Header] which holds the VCR\CCR records with unique primary key.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[VehicleAnalysis_Header](
[Head_ID] [int] IDENTITY(1,1) NOT NULL,
[VCRRecType] [varchar](3) NULL,
[VCRCustNo]...
January 5, 2017 at 10:16 pm
DDL is below and some sample data is attached, the required format is pipe delimited | | | | etc...
CREATE TABLE [dbo].[VehicleAnalysisVCR](
[VCRRecType] [varchar](3) NULL,
[VCRCustNo] [int] NULL,
[VCRCostCentre] [varchar](max) NULL,
[VCRCollationFlag] [varchar](2) NULL,
[VCRPrintFlag]...
January 5, 2017 at 2:54 pm
I found and fixed the problem in the CTE's I added more joins and this removed the No Join Predicate, thanks for the replies.
January 4, 2017 at 3:06 pm
something like this;
Select
SUM (CASE WHEN DATEPART(m, [FuelTranDate]) = DATEPART(m,GETDATE()) THEN LastOdo ELSE '' END)
- SUM(CASE WHEN DATEPART(m, [FuelTranDate]) = DATEPART(m, DATEADD(m, -1, GETDATE())) THEN Lastodo ELSE ''...
November 24, 2016 at 7:56 pm
Thanks a lot for the replies. Not sure why it didn't work the first time when I had @SaleID as the output.
September 20, 2016 at 11:05 pm
Thanks for the replies.
None of these work and the @@rowcount is also only returning '1'
,SUM([>7 Days]) OVER(PARTITION BY f.Country ,f.CompanyName ,f.InvoiceID ,f.SupplierCode ,f.InvoiceNumber
,f.[Scan Date] ,f.[Approval Date]...
July 5, 2016 at 6:26 pm
I added a primary key to the AUD currency table and tried this. it returns the same as the cursor, multiple emtpy sets, can anyone detail what is wrong.
DECLARE...
May 19, 2016 at 9:36 pm
Yeah I just created a rate table, dbo.aus for the first set. trying to make it more dynamic so the rates can be updated and automatically and if there's match...
May 19, 2016 at 1:06 am
Thanks Orlando and Alan for the replies.
Is dbo.splitcsv a reserved table or function somewhere as i am unable to find it within the DB?
March 23, 2016 at 8:27 pm
I resolved it using the code below, you cant use the derived column replace function and datepart, so i had to make it as a new column and in a...
February 22, 2016 at 9:54 pm
Orlando Colamatteo (1/27/2016)
Or are you looking to copy data from an XML column in one server...
January 27, 2016 at 9:13 pm
The end result i am trying to achieve is to export the XML into another table or tables depending on the data structure, then write some reports via SSRS.
select Col1...
January 27, 2016 at 9:02 pm
Thanks it worked, the group by replace is a good one didn't think of that I ended up with this.
IF OBJECT_ID(N'tempdb..#tmp_Supplier') IS NOT NULL
DROP TABLE #tmp_Supplier;
...
January 21, 2016 at 10:48 pm
Thanks Orlando, I will try your's now my idea was something like this but it not finished yet.
DECLARE @II INT, @iiMax INT, @Code VARCHAR(100),@corporate_id VARCHAR(100)
DECLARE @TemporaryStagingTable TABLE(id INT IDENTITY(1,1) PRIMARY...
January 21, 2016 at 10:14 pm
There not duplicate until I run the update and remove the double quotes in the column.
January 20, 2016 at 4:25 am
Viewing 15 posts - 31 through 45 (of 90 total)