Viewing 15 posts - 1 through 15 (of 29 total)
Hi
In Sql Query or using Stored Procedure
Thanks
August 15, 2023 at 9:36 am
Hi Jeff
How the below code works
Sampl11=SUM(IIF(Sampl11='Y',1,0))
Thanks
December 19, 2021 at 4:20 am
Hi Jeff
Below is the data
CREATE TABLE Persons (LastName varchar(255),FirstName varchar(255),Sampl11 varchar(255),Sample2 varchar(255)); Insert Into Persons values('1','A','Y','N')Insert Into Persons values('1','A','Y','Y')Insert Into Persons values('1','A','N','Y')Insert Into Persons values('1','A','Y','Y')
Thanks
December 19, 2021 at 3:16 am
hi
I want same group by condition which is in outer. What is the other to solve this issue
Thanks
December 19, 2021 at 1:08 am
Hi
Closed . Field was wrong
Thanks
December 18, 2021 at 10:14 am
Hi
I have asked the question Inner select count is not returning any Data
Thanks
December 18, 2021 at 9:46 am
Hi Jeff
Since i have not used T0.U_Date that's why i think it is giving error but it should not work like this
How i can resolve it
Thanks
December 17, 2021 at 1:48 am
Hi Jeff
When i print dynamic sql it shows U_Date in where clause whereas i have given T0.U_Date. i have made bold where it gives error
SELECT
T1.U_VendCode as "Vendor Code",T1.U_CabNo,T1.U_VendName as "Vendor...
December 17, 2021 at 1:37 am
Hi Brian Below is the correct codeWhen i print below Dynamic Sql it shows below statement in PrintALTER PROCEDURE [dbo].[Temp]@frDate date,@toDate date,@VCode nvarchar(15) = null,@VName nvarchar(100) =...
December 17, 2021 at 1:17 am
Hi
When i print above sql it shows below issues
In where Clasue i have given T0,U_Date but it is showing U_Date
Secondly it is giving error Must declare scalar variable @frDate
SELECT
T1.U_VendCode as...
December 17, 2021 at 1:09 am
Hi
WHen i write like this it says Incorrect syntax near 2021
Set @Sql = 'Select * from tbl1 '
SET @Where = @Where + ' T0.U_DATE BETWEEN '2021-03-01' and '2021-03-31' '
December 16, 2021 at 5:32 pm
Hi Steve
Can't we use with where clause only
Thanks
December 15, 2021 at 2:19 pm
Hi
Error is coming Invalid column HCode
Thanks
December 15, 2021 at 11:15 am
Hi Phil
if field1 = 'Y' then
Code=STUFF
(
(
SELECT ', '+ CAST(A0.[SCode] AS VARCHAR(MAX))
FROM tbl1 A0
INNER JOIN tbl2 A1 ON A0.[Id] = A1.[Id]
WHERE A1.docentry = A0.DocEntry
FOR XMl PATH('')
),1,1,''
)
else
Code=STUFF
(
(
SELECT ', '+ CAST(A0.[ACode] AS VARCHAR(MAX))
FROM...
December 15, 2021 at 10:30 am
Hi Phil
In this example i have one select statement . I want to stuff on a condition.
Suppose if Field1 has value 'Y' then above select statement should be used
else another...
December 15, 2021 at 9:34 am
Viewing 15 posts - 1 through 15 (of 29 total)